Employees row a boat as they examine solar panel boards at a pond in Lianyungang, Jiangsu Province, China, in this March 16, 2016 file photo. Reuters/Stringer Images of the Beijing smog and millions of people wearing masks to be able to breathe are among the more dramatic depictions of air pollution caused by excessive industrialization. Now that China is turning away from industrial manufacturing and towards services, it is focusing on remedying some of the damage already done.

This week, media welcomed the completion of what may well be the world’s largest floating solar farm, in the eastern Anhui province. The 40 MW installation sits on a flooded coal-mining town, which adds a kind of poetic element to the story – a shift away from coal and to solar and wind. But poetry is certainly not the reason why this location was selected: according to a local government source, the cool surface of the water will improve power generation.

The floating farm is the latest demonstration that China is serious about its green energy plans. Earlier this year, Beijing said it would splash US$361 billion on expanding the country’s renewable power capacity by 2020. By 2022, China should have 320 GW of wind and solar power capacity, along with 340 GW of hydropower.

These plans earned it the top spot in E&Y’s raking of the top 40 renewable energy markets, followed by India, who has plans for 175 GW of renewable energy by 2022. That China is in the top spot is no wonder, given that China was the biggest spender on renewable energy globally in 2015, allocating US$102.9 billion, or 36 percent of the total spent on renewables in the world that year, according to the UN Environment Programme. Last year, China installed 35 GW of solar power generation capacity, which, according to one Greenpeace expert quoted by the National Geographic, equals the total solar capacity of Germany.

By 2030, China aims to generate a fifth of its energy from renewable sources. Coal consumption has been falling for the last three years in a row. This may not be good news for coal producers—China gobbles 50 percent of the world’s total output—it is certainly good news for pretty much everyone else.

What’s more, the renewable drive seems to be working for China’s international deputation. Just this week the UN’s Secretary-General Antonio Guterres praised China for being “probably today the only big country in the world that has a clear, long-term strategy,” regarding climate action. At the same time, Guterres warned U.S President Trump to stay on board with the Paris Agreement or risk leaving a void that another country would fill – China, Russia, and even Iran.

Guterres did not stop there. He said that if the U.S. pulls out of the Paris Agreement—which sources close to Trump say is a for-sure thing—China will automatically take its place as the leader of global climate action, despite the fact that it is currently the most polluting country in the world. China seems to be already preparing for this gig: its One Belt, One Road global initiative envisages investments of US$900 billion in infrastructure projects in the developing world, some of which would likely go towards renewables projects – after all, the top two biggest suppliers of solar panels globally are Chinese. In fact, six of the top ten suppliers are Chinese.

China is betting on solar, and it’s betting big. It may well turn from the biggest polluter into the most vocal advocate of climate action. It’s only in its best interest – all those coal miners losing their jobs with the shutdown of mine and the shift to cleaner energy will need jobs, for one. For another, it is important for the world’s second-largest energy consumer to reduce its dependence on imported energy. All very good reasons to go renewable and do it quickly.