If the Trump administration withdraws the United States from the Paris Agreement, the country would face a massive global diplomatic backlash and permanently cede worldwide leadership on climate and renewable-energy issues to China, experts warn.

Withdrawing from the treaty “would be a huge mistake, even forgetting about climate change,” said Todd Stern, the former U.S. special envoy on climate change. He added that it would have “radiating bad impacts with respect to U.S. standing” on all other international issues.

We know very little for sure about the Trump administration’s foreign policy. So far, he has seemed to choose Russia-friendly advisors like General Michael Flynn, and he has not backed down from previous threats of a trade war with China. If the U.S. were to renege on its NATO commitments or enter a battle of tariffs with China, this could so remake global order that climate would slide off the international agenda.

But if the administration pursues a largely typical, business-friendly foreign policy, then the United States’ withdrawal from Paris could scuttle some of its other diplomatic goals. It could struggle to favorably renegotiate NAFTA, for instance. Leaving Paris could also damage American companies and economic innovation while needlessly ceding diplomatic ground to China.

We saw two early signs of that this week. On Tuesday, more than 300 companies called on the president-elect to remain in the Paris Agreement and continue helping the U.S. move toward a “low-carbon economy.” These firms include DuPont, Intel, General Mills, the Kellogg Company, Mars Incorporated, L’Oréal, and the Craft Brew Alliance. Many of the companies have donated thousands or tens of thousands of dollars to Republican lawmakers or campaigns in the past.

And on Wednesday, China’s vice foreign minister, Liu Zhenmin, promised that his country had not invented climate change as a hoax. Four years ago, Trump tweeted that “the concept of global warming was created by and for the Chinese in order to make U.S. manufacturing non-competitive.”

“If you look at the history of climate-change negotiations, actually it was initiated by the [Intergovernmental Panel on Climate Change] with the support of the Republicans during the Reagan and senior Bush administration during the late 1980s,” said Liu.

In other words, a Chinese diplomat had to assure the U.S. president that, no, his country hadn’t invented a widely documented scientific phenomenon (which was discovered in part by American scientists).

* * *

When it was ratified last month, the Paris Agreement became the first truly global treaty to address climate change. It is largely non-binding for the United States, and it does not legally require this country to reduce its emissions.

During the campaign, Donald Trump promised he would withdraw the United States from the Paris Agreement if he were elected.

Technically, the U.S. could not withdraw from the Paris Agreement for four years. But it could summarily stop participating in the annual meetings that the treaty requires. It could also announce its withdrawal from the much older overarching treaty, the UN Framework Convention on Climate Change adopted by President George H.W. Bush in 1992.

Due to a fluke in terms, it would only take the United States one year to withdraw from the broader UNFCCC. But leaving the UNFCCC would carry broader problems for American firms.

The Obama administration had hoped to meet the non-binding promises that it made at Paris through a set of EPA regulations called the Clean Power Plan. Generally, these rules pushed states to build fewer coal-burning plants while installing more renewable-energy capacity. It also set up the basics of an interstate cap-and-trade structure.

The Clean Power Plan, however, was put on hold by the Supreme Court earlier this year, and the D.C. Circuit is now examining whether it can pass legal muster. The Trump campaign promised to repeal these executive actions on the first day of the administration. To start, it could simply decline to defend them in the courts.

But to truly undo them, it would have to go through a lengthy rule-making process. The EPA must regulate carbon dioxide as an air pollutant thanks to a 2007 Supreme Court decision, Massachusetts v. EPA. Were Congress to amend the Clean Air Act such that the EPA no longer had this obligation, Republicans could open up greenhouse-gas-emitting companies (like factories and manufacturers) to private litigation under a 2011 Supreme Court decision.

Oren Cass, a senior fellow at the Manhattan Institute who researches energy and the environment, said that the U.S. could cancel the Clean Power Plan while continuing to attend annual UN climate meetings.

“I would hope that Trump’s plan isn’t just to remove the U.S. from the [UN Framework Convention on Climate Change]. That doesn’t strike me as useful,” he said.

“I think it would be perfectly sensible to say that President Obama made a pledge that he had no idea how he was going to meet,” he added. The U.S. could say that “if anyone was curious, we don’t consider that to be binding—but we look forward to seeing you again next year.”

Stern, the former U.S. climate envoy, also warned against leaving the Paris Agreement. Stern led the American negotiating team for both the Paris Agreement and the older Kyoto Protocol. He believes that if the United States abandons the Paris process, it will essentially cede leadership on the issue to China.

“The Chinese are already warning that if Trump were to pull out, he would be defying the wishes of the entire planet. The Chinese are pretty clear that they have no intention of walking away,” Stern told me. “I think you’re going to see that all over, other countries are going to be furious with us. It’s not like, ‘oh, the U.S. isn’t there, we’ll go ahead anyway.’ No. They’re going to be furious, but I don’t think they’ll walk off.”

If this discussion seems familiar, it’s because something like this has happened before. In 2001, the newly elected Bush administration announced that it would not abide by the Kyoto Protocol. The Kyoto Protocol, a shorter and less detailed agreement than Paris, was meant to tackle global warming by implementing a cap-and-trade deal, but it only covered developed countries like Germany and Australia.

The situation around the Kyoto protocol in the early 2000s looked far worse than the situation around the Paris Agreement today. Most of the details of the treaty had not been worked out, and important considerations—such as whether carbon trapped in forests would determine emission calculations—were unresolved.

“Those were big sources of disagreement that had caused complete deadlock at previous conferences. There was a real sense of dread and despair” around the Kyoto Protocol, said Michael Wara, a professor of environmental and international law at Stanford.

“The U.S. walks away, and then they said we need to paper over our differences and make this work,” he told me. The signatories to the Kyoto Protocol reached an agreement partly out of resentment of the United States.

Bush would later clarify that he had refused to sign the Kyoto Protocol because it did not include India or China. But both countries are included in the Paris Agreement.

Wara said that if the United States were to abandon the Paris Agreement, then China would likely take over global leadership on the issue.

“My impression from afar is that President Xi, and China more generally, see this as a strategic issue that they are investing more heavily in. It’s not even a matter of investing in climate. It’s that policies they are committing to are consistent with overall economic strategy,” he said.

In other words, China’s climate policies are served by its overall need to transition to a more service-dominated economy. Switching to renewable energy, and pushing for electric car adoption, also helps it address its pollution problem.

Were the United States to simply abandon the Paris process, it is likely that the mechanisms which guide the agreement—such as whether countries’ emission-reduction goals are subject to outside scrutiny—would become less transparent.

“You are likely to get international climate policy with Chinese characteristics,” Wara told me. This would mean, in part, that China’s faulty and unreliable energy statistics would define whether it was complying with the agreement. The American strategy, led by Stern, has been to seek outside validation for other countries’ climate goals.

* * *

Leaving negotiations around the Paris Agreement is not the worst thing that the Trump administration could do for U.S. climate and clean-energy policy, however. Were the United States to start a trade war with China, it would devastate the country’s emerging renewable-energy economy.

“From a clean-energy perspective in the United States, a trade war with China has the potential to do enormous harm,” Wara told me. Supply chains for American solar panels and wind turbines are so delicate, and so dependent on global trade, that a trade war could perversely allow China to race ahead on renewable technology.

This could prove supremely unpopular: An overwhelming majority of Americans, more than 80 percent, favor expanding wind and solar energy. And it would cut into American competitiveness at a vital time for the industry.

”I think it was two years ago, the module price for solar fell below a dollar for watt. And I was like, ‘Wow, that’s unbelievable!,’” Wara said. “But the price right now is 35 cents per watt, and it’s headed to 30. It’s not like that means solar panels are cheap, it means that it unlocks all these different important ways for how you approach solar as a business. You can look at solar as an add-on.”

“If those cost declines continue, and we are divided in a protectionist setting, we’re also likely to be at a real competitive disadvantage,” he added.

For now, though, that conversation seems to be months off. The Trump administration must first confront the Paris Agreement question. And there, he will hear from two unusual allies who agree he should keep it: Barack Obama and Bill O’Reilly.

Paris “has made our economy more efficient, it’s helped the bottom line of folks, and it's cleaned up the environment,” said President Obama earlier this week. “It says to China and India and other counties that are potentially polluting: Come on board. Let’s work together so you guys can do the same thing.”

“President-elect Trump should accept the Paris treaty on climate to buy some goodwill overseas,” said O’Reilly on his show Wednesday night. “It doesn't really amount to much anyway, let it go.”

Stern would agree. “There’s just so much more consequence to this than Kyoto,” he told me on Monday. “We know there’s collateral damage when a president takes a step like” de facto withdrawing from the Paris Agreement.

He went on. “If [Trump] has senior national-security advisors—the secretary of state, the national-security advisor, others in that establishment—who have some wisdom about them, I think that they would warn him to say, you don’t do that. The cost-benefit is just crazy against that. That little political hit with the base is the only thing that argues in favor of it, against what I would anticipate to be … a huge diplomatic backlash, all over the world.”

If the United States left Paris, “I don’t think people are going to want to go back to their drawing board and start over. It will be consequential, and I suspect it will have the impact of having the whole system just kind of … not work … as effectively and as rapidly as it would if the U.S. were there,” he said.

“If the U.S. wanders off, that’s going to harm the pace and effectiveness of the system. I think that they will try to show that they’re in—and, at some level, make us look bad.”