The squares of silicon are hardly thicker than sheets of paper, each about six inches by six, with narrow stripes of silver. They come into the factory by the thousands, stacked in cardboard boxes, and within hours, they’ll be ready to leave again.

The squares are solar cells, and in this plant two hours’ drive from Shanghai, workers in bright blue uniforms and white lab coats run the machines that assemble them, row by row, into more familiar-looking panels, ready to be installed on rooftops or in large arrays and begin turning sunlight into electricity.

Chinese manufacturing has changed the economics of renewable power around the world, making solar generation cost-competitive with electricity from fossil fuels like natural gas and even coal. It has brought change closer to home too, as China rolls out the world’s biggest investment in clean energy—motivated in part by a desire to ease the atrocious air pollution that kills an estimated 1.1 million of its people every year.

Renewable Energy 101

“The installation rates are absolutely mind-blowing,” says Lauri Myllyvirta, an energy and air pollution expert at Greenpeace in Beijing. China added 35 gigawatts of new solar generation in 2016 alone. “That’s almost equal to Germany’s total capacity, just in one year,” Myllyvirta says.

Every hour, China erects another wind turbine and installs enough solar panels to cover a soccer field, according to Greenpeace estimates.

Beyond Coal

After years of ignoring the air quality crisis that has resulted from decades of breakneck industrialization, China’s leaders have finally begun trying to solve it. And because coal is the source of an estimated 40 percent of the most dangerous pollution particles in the country’s air , finding alternatives to it has become a crucial priority. China aims to get 20 percent of its energy from renewable sources by 2030, and it recently announced it would spend $360 billion on the effort in just the next three years.

In the Yangtze River Delta, a region known for its economic dynamism, Jinko Solar is one of the companies that has sprung up to meet that demand. It exports its solar equipment too, to the United States, Europe, Latin America, the Middle East and elsewhere. Last year, it produced panels with an electricity-generating capacity equivalent to about 10 typical coal-fired plants.

View Images Workers at a Jinko facility in Shangrao fabricate solar cells. Photograph by Zhuo Zhongwei, Imaginechina via AP

Here in Haining, the factory floor is clean and bright, and a low whoosh is the only noise as red, robotic arms lift and twist, moving the panels from one station to the next. Workers, some in white masks that cover their faces and heads, others sporting colored baseball-style caps, test and tweak as layer is added to layer and the parts are sealed together into ready-to-go modules, wires dangling from a small black box mounted on the back.

Air pollution isn’t the only reason China is so serious about renewables, but it’s a powerful one. And it was a big part of what put President Xi Jinping in a position to announce, in a landmark 2014 deal with President Obama, that China’s emissions of planet-warming carbon dioxide would peak around 2030, a pledge that became the centerpiece of its commitments under the Paris climate agreement.

It appears now to be ahead of schedule in meeting that goal. Official figures can be unreliable, but they show that coal consumption, the main driver of China’s carbon emissions, fell in 2016 for the third straight year. And because China has clearly decided that cutting coal use—the fuel powers much of its heavy industry as well as providing electricity— is in its own interest, it’s a trend that’s likely to continue even as the United States, under President Trump, abandons Obama’s climate agenda.

Because China accounts for half the world’s coal consumption, that’s good news not just for the health of those who must breathe its air, but also for the wider effort to check runaway global warming.

“I think it’s fair to say that it wouldn’t have happened as fast and with as little resistance as it has if it hadn’t been for the air pollution motivation,” Myllyvirta says. “It’s really hard to argue against when you’re sitting in Beijing,” breathing its toxic air.

Kinks in the Grid

The renewables rollout has not been without its troubles. Vast fields of wind turbines have been erected in the country’s sparsely populated northwest, far from the big cities where electricity is most needed, and the construction of transmission lines to move all that power has failed to keep up.

“They set up these huge wind farms and they don’t have connections to the grid,” says Antung Liu of Indiana University Bloomington. “They just have this attitude that ‘We’ll build it, and hopefully we’ll be able to use it later.’”

What’s more, grid operators have shown a bias toward coal production, so renewable power has sometimes gone unused even when the physical connections are there. Greenpeace estimates that 19 percent of Chinese wind power was wasted in the first three quarters of last year.

Leaders are now starting to reckon with those issues, installing new power lines and focusing on building smaller wind and solar farms in populated areas.

Not far from Jinko’s factory, another arm of the company operates just such an array. Inside rows of long, low buildings, a new season’s crop of mushrooms are about to be planted. They don’t need sunlight, so the greenhouse roofs have been given over to solar panels. Nearly 19,000 of them, mounted in rows overhead, generate electricity that is fed into the grid.

At first, China’s effort “was only about getting the gigawatts up,” says Jukka-Pekka Mäkinen, CEO of The Switch, a Finland-based company manufacturing wind-power components in China. “Now it’s keeping up the gigawatts, but doing it much smarter, and focusing in areas where the consumption is.”

Despite such efforts, China is also still building coal-fired power plants, in part because of an incentive structure that encourages provincial officials to green-light unnecessary construction, even as the central government seeks to push cleaner options. But officials have also begun cancelling some that are already in the planning pipeline, aware that China already has more coal-fired power generation than it needs.

A Manufacturing Monster

It’s not just pollution that’s driving the determined focus on renewable power. Leaders have made clear that they view clean energy as a powerful engine for job creation.

“It’s about setting up for manufacturing dominance,” Liu says. “China sees green energy as an opportunity where it can become a manufacturing monster the way it has in clothes and toys.”

Whatever the motivation, the consequences of China’s clean energy buildup are already clear. Wealthier nations that once used China as an excuse for their own inaction are now watching it zoom past them to become a global climate leader.

“Everybody was saying ‘China didn’t sign the Kyoto agreement,’” the 1997 climate deal, Mäkinen recalls. “So what? They did more than everybody else put together.”

The Pulitzer Center on Crisis Reporting funded travel for this story.