For years, U.S. opponents of climate action used China as an excuse. Why, they asked, should the United States adopt measures to slow climate change that would be overwhelmed by a rapidly growing Chinese economy, fueled by coal plants spewing greenhouse gases?

How things have changed. This year, it is the Chinese government that has continued to embrace bold climate action, while President Trump on Tuesday moved to roll back a signature U.S. climate program aimed at capping emissions from coal plants and other sources — even as his administration is also seeking to slash government funding for research into better renewable technologies.

“We should develop new growth models and seize opportunities presented by the new round of industrial revolution and digital economy,” Chinese President Xi Jinping said in a Jan. 17 speech in Davos, sounding a lot like earlier U.S. presidents. “We should meet the challenges of climate change and aging population.”

China is pressing ahead with a goal of boosting non-fossil fuels to 20 percent of the country’s total energy consumption by 2030, in part by reaching 200 gigawatts of installed wind capacity and 100 gigawatts of solar. That would be nearly 2 1/2 times the amount currently installed in the United States.

“Just when solar is becoming economic, we’re seeing countries like China and India embrace the technology, whereas clearly, moving to repeal the Clean Power Plan is movement in the other direction,” said Tom Werner, the president and chief executive of SunPower, a major U.S. solar company that has four joint ventures in China. One such venture, with Apple, has installed solar plants in Sichuan province and Tibetan and Qiang regions of China — moves that have helped the tech company green its business in the country.

President Obama for eight years pressed his fellow Americans to support climate action, not only to fulfill America’s international obligations but also to appeal to their competitive spirit. In June 2013, he vowed that “we will continue to drive American leadership in clean-energy technologies, such as efficient natural gas, nuclear, renewables, and clean coal technology.”

In 2014, Obama forged an agreement with China’s leader to cut both nations’ emissions. The pact between the two biggest polluters set in motion the 2015 Paris climate accord.

President Obama tells fellow world leaders at the United Nations summit in Paris that the U.S. accepts the responsibility to help fix climate change. (Reuters)

Trump’s policies undermine that effort at a time when U.S. renewable energy companies are already fighting for market share and technological leadership against foreign competitors, most notably China’s solar and wind companies.

“The Chinese are stepping up, taking a greater leadership role. They get to forge closer ties with lesser developed countries to whom they very happily are going to export lots of their equipment,” said Ethan Zindler, head of Americas research for Bloomberg New Energy Finance.

“Chinese companies are extremely aggressive about getting opportunities in sub-Saharan Africa and elsewhere. They’re aggressive in bringing along the money to build the projects,” Zindler added.

There is expected to be a vast market in coming years for renewable-energy installations in emerging economies such as India, as well as numerous countries in Africa, South America and southeast Asia. One leader in reaching these new markets is China’s Xinjiang Goldwind Science and Technology, or Goldwind, the country’s largest manufacturer of wind turbines. In addition to pursuing recent projects in Chile, Pakistan and South Africa, it recently moved to acquire a wind farm in Texas.

“If you look at the data in terms of clean-energy investment trends around the world, China has been in the leadership role for several years and continues to be,” added Joanna Lewis, an expert on the country’s clean energy industry at Georgetown University.

In 2016, according to Bloomberg New Energy Finance, China saw $87.8 billion in clean energy investments, compared with $58.6 billion from the United States.

“China is stepping into not only an international climate leadership role but also an international clean-energy innovation and deployment leadership role,” Lewis said. She noted the symbolism that this year, China will host both the international Clean Energy Ministerial, in Beijing in June, and the second Mission Innovation ministerial, a gathering of countries pledged to supercharge investments in new energy technologies.

That’s not to say everything works perfectly in the burgeoning Chinese clean-energy economy. There are grid problems that curtail potential clean electricity output, underusing wind turbines so as not to feed too much electricity to a swamped grid, Lewis said. But these appear to be growing pains. The overall direction remains clear — and so does the lead in comparison with the United States.

Views within China this week on the meaning of Trump’s move weren’t unanimous, but there was one common theme — the country is surging forward in renewable energy regardless.

Jiang Kejun, a researcher at the Chinese government think tank Energy Research Institute, suggested Trump’s executive order would benefit China. “Because the U.S. has slowed down its steps, others feel more push to cooperate,” he said. “We were expecting the U.S. to take the lead before; now we realize we have to rely on ourselves.”

But Lin Boqiang, an energy expert at Xiamen University, said Trump’s decision to scrap the Clean Power Plan would not have too much impact on Chinese wind and solar industries. “Chinese companies do not have a big share of the U.S. market, and hence it won’t be affected too much. Chinese companies’ chief market is our own domestic market, and China’s commitment has not changed.”

However, Lin expected some negative impact on the global clean-energy market. “Under the Paris agreement, the U.S. would help provide financing for many other countries to switch to renewable energy. Now that the U.S. is exiting from its promise, many countries might not have enough funding to pursue renewable energy. Therefore the global market demand might decline.”

Simon Denyer and Luna Lin contributed to this report.

More at Energy and Environment:

For more, you can sign up for our weekly newsletter here and follow us on Twitter here.