BEIJING — One year ago, China’s capital city was in the grip of suffocating and potentially fatal smog that made life a misery and breathing downright dangerous.

This month, the air in Beijing has been clear and the skies blue.

Favorable wind and weather have played a part, but this is no fluke.

Last year as a whole, Beijing recorded its largest improvement in air quality on record. The average concentration of tiny “PM2.5” particulates fell by more than 20 percent, according to Greenpeace East Asia.

In a mad dash to meet year-end air pollution targets and combat the traditional winter smog, 5,600 environmental inspectors were hired from around the country and dispatched into the industrial heartland surrounding the capital.

Tens of thousands of polluting factories were forced to clean up their operations or were simply closed, while millions of households were hurriedly shifted off coal-fired heating and onto natural gas.

There was a price: The factories that were closed had supported thousands of jobs. Millions living in the region surrounding Beijing lost their coal-fired heating without receiving gas heat to replace it and have suffered through freezing weather.

‘Important battle has been won’

With that social price will inevitably come pressure to back off the clean-air policy. For now, though, the result represents a powerful show of political will that has upended a long-standing assumption – that the Communist Party would always put the economy ahead of the environment. It has raised expectations that the country could be turning the corner in addressing its infamous pollution problem.

“We need to recognize that a very important battle has been won,” said Ma Jun, founder of the Institute of Public and Environmental Affairs in Beijing. “This could be a very important step towards finally winning the war.”

In 2013, in response to significant public anger, Chinese Premier Li Keqiang launched a “war on air pollution.” Then, spurred on by last winter’s “airpocalypse,” as it was colloquially known, Li issued another call to arms last March, vowing at the annual meeting of the National People’s Congress to “resolutely fight a good battle to defend blue skies.”

In 2014, Beijing’s mayor said he had made a “life and death” contract with the central government to reduce the city’s PM2.5 concentration to 60 micrograms per cubic meter from about 90 at the time. In late 2016, with the target apparently out of reach, he was replaced.

Even in recent months, few people would have thought Beijing would hit its target, said Li Shuo, a senior policy adviser with Greenpeace.

Against the odds, the target was met.

Hasty decisions

In Beijing, sales of face masks and air purifiers are reported to have fallen, as the number of “heavy pollution days” fell to 23 in 2017 from 58 in 2013. Partly thanks to the weather, PM2.5 levels in Beijing in the fourth quarter of last year were less than half what they were a year earlier, Greenpeace calculated.

But the measures have also been a double-edged sword, or a clumsily wielded one.

In the province of Hebei, which surrounds Beijing, factory workers complain of slowdowns and closures that threatened their incomes and livelihoods, while householders have struggled for weeks in freezing conditions because their coal-fired heaters were demolished without supplies of natural gas being provided immediately.

This is the heart of the worst industrial-air-pollution hot spot in the world, a province that alone produces more steel than all of Western Europe produces. Here, cement, ceramics and chemical factories belch thick smoke into the air, and when the wind blows from the south, a toxic cloud is sent north and toward the capital.

For years, Hebei’s leaders had been reluctant to do anything to undermine their own economy.

Last year, that changed. Beijing’s middle class was too important a constituency to be ignored, and the capital’s awful air was a global embarrassment.

As part of a “winter action plan,” inspectors recruited from other parts of the country were given a much stronger mandate, competing among themselves to see how many offending factories they could close.

All over Hebei, signs announce “coal-free” zones.

In their zeal to please the central government, some officials overstepped the mark, demolishing millions of coal heaters before installing replacement natural gas systems.

As millions of people shivered through freezing conditions and took to social media to express their anger, the government changed course, relaxing its ban on coal.

The reversal came too late for restaurant owner Jiao Changguo, 47, in the village of Xijiao, whose coal stove was demolished two months ago.

“Since the environmental protection policy started, people’s income – well, there is simply no comparison with the past,” he said.

In nearby Zuogezhuang township, the Langfang Xinsitong Wood Industry Company, which normally has about 100 employees making plywood and blockboard, stood idle last week. It spent two months and $150,000 last year demolishing its coal-fired boilers and installing natural gas, said saleswoman Zhang Caihong, but now there is no gas and the workforce has been sent home early ahead of Chinese New Year in February.

“The situation in Zuogezhuang is in a mess,” she said. Her company lost another four months’ production to various government-mandated shutdowns last year, sometimes to ensure the sky was blue during “important meetings” in Beijing, and is likely to struggle to survive if this year is as bad.

“More than half the companies here are not functioning right now,” she said. “If you come back next year, you will see that some of them will not exist.”

Overall, over the past four years, average PM 2.5 levels in the 74 cities across China for which data is available fell by 35 percent, Greenpeace calculates. But the more recent, dramatic improvement in Beijing and Hebei in the fourth quarter was offset by deterioration in other parts of the country, including in the provinces of Anhui and Jiangsu that abut Shanghai.