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 closed factories 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.
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 in March, pledging at the annual meeting of the National People's Congress to "resolutely fight a good battle to defend blue skies."
Yanmei Xie, a China policy expert at Gavekal Dragonomics, calls the past few months a "shock and awe" campaign.
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.
"There were so many actors involved, it was so difficult to get enforcement on the ground; it's not only the energy sector, it's heating, it's iron and cement, it's construction and transportation," he said. "And who knows which direction the wind will blow?"
Against the odds, and with a little help from the wind, the target was met.
"It's fascinating it all worked out, and it makes us revisit some of the assumptions we made previously," Li added. "If the leadership is determined to do something, what if they could actually deliver on air quality?"
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. Schoolchildren, often kept inside during recess on bad days, were allowed to play outdoors more frequently.
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 residents 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. Here, cement, ceramics and chemical factories belch thick smoke, 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, throw people out of work and potentially generate social unrest. Factories that pollute but also generate tax revenue and jobs were seen as untouchable, and inspectors from the Ministry of Environmental Protection appeared impotent.
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.
Huge numbers of small factories were shut down, while larger ones were forced to switch from coal to natural gas and to use filters to clean emissions. Major construction projects were halted, and coal-fired stoves in millions of homes were demolished.
All over Hebei, signs announce "coal-free" zones.
"The central government tapped into public pressure, the public's aspiration for clean air, to crack local resistance," said Ma, of the Institute of Public and Environmental Affairs.
In their zeal to please the central government, some officials overstepped the mark, demolishing millions of coal heaters before installing replacements. Other residents had the new systems installed but found no gas in the lines; factories making the same coal-to-gas transformation had sucked up all the available supplies.
As millions of people shivered through freezing conditions and took to social media to express their anger, the government changed course in early December, 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.
One lunchtime last week, his restaurant stood cold and empty. He has a gas cylinder and a patio-style heater, but it is too expensive to operate unless he has customers. And with all the glue factories in the neighborhood closed by the inspectors, he has very few.
"Since the environmental protection policy started, people's income — well, there is simply no comparison with the past," he said. "When it comes to the future, for ordinary people, especially in the villages, they can't see any prospects."
In nearby Zuogezhuang township, the Langfang Xinsitong Wood Industry Co., which normally has about 100 employees making plywood and blockboard, stood idle last week. It spent two months and 1 million yuan ($150,000) last year demolishing its coal-fired boilers and installing natural gas, said saleswoman Zhang Caihong, but now there is no gas after that two-month loss of production for the conversion, and the workforce has been sent home ahead of Chinese New Year in February.
"Zuogezhuang is in a mess," she said. Her company lost another four months' production to various government-mandated shutdowns last year — sometimes to ensure that 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."
These experiences are replicated all over Hebei, raising the question of whether the recent campaign will be sustained this year. The pendulum has swung between the economy and the environment in the recent past. In 2014, coal consumption began to fall, to many people's surprise, but two years later, the government launched a stimulus package that poured money into construction and heavy industry, pushing more pollutants back into the air.
Overall, though, under President Xi Jinping, environmental concerns have greater weight, said Xie at Dragonomics.
But political will alone is not enough, she says. A thorough transformation of the economy needs to occur if progress is to be sustained.
Overall, over the past four years, average PM2.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, which abut Shanghai.
Liu Yang contributed to this report.