A road worker picks up trash along the median of a highway on a smoggy day in Beijing on March 6. (Mark Schiefelbein/AP)

Even by China’s standards, it has been a contradictory couple of weeks on the environment.

First, a powerful documentary on air pollution, produced with official support, was released online and swiftly went viral, garnering more than 200 million views within days before being blocked by government censors. Today all references to the film have been scrubbed from the Chinese Internet, more effectively than the air ever could be.

On the sidelines of the annual meeting of the country’s parliament, the National People’s Congress, President Xi Jinping vowed to punish “violators” who destroy the environment “with an iron hand.” Premier Li Keqiang opened the two-week-long NPC gathering by calling pollution “a blight on people’s quality of life” and promised significant cuts in emissions.

On Sunday, he ended the meetings with a promise not to end his government’s “war on pollution” until it reached its goal, and a pledge that the law would work “as a powerful, effective tool to control pollution — and would not be as soft as a cotton swab.”

Yet as factories, trucks and oil companies continued to flout environmental regulations, police had different targets in their sights. On March 6, an activist in the southern city of Guangzhou who reposted information on social media about a planned gathering of “mothers concerned about the harm of smog” was arrested and put in detention for 14 days; two others were held overnight in Xi’an for brandishing placards blaming the government for the smog.

So is the government serious, or is it all a show? And if it really wants to improve the environment, what is wrong with a little public support and pressure?

The answers lie within the complex, many-headed nature of China’s communist government and the huge challenges involved in addressing air pollution. The Communist Party, while obsessed with control and distrustful of public participation, recognizes that this is a huge touchstone issue for the urban middle class.

China is experiencing what Wang Tao of the Carnegie-Tsinghua Center for Global Policy in Beijing calls “the early tides of a sea change” when it comes to energy and the environment. Yet contradictions and power struggles are often at their sharpest when the tides are turning.

“The environment ministry certainly wants to get more power, and it can see huge pressure from the public for a better environment,” he said. “But there is resistance from vested interests, and a power struggle over who should lead this process, in terms of policies and setting standards.”

China burns more coal than the rest of the world combined, but last year — against expectations — coal consumption fell by 2.9 percent, its first decline in living memory.

Electricity generation by coal-fired power plants also fell for the first time in decades; coal- and steel-producing provinces that long sat at the top of the country’s economic growth tables tumbled to the bottom of the pile.

Part of the reason is China’s economic slowdown, which has hit heavy industry and the real estate sector hardest, and highlighted significant overcapacity. But government measures to cap coal and steel production, enforce stricter emissions targets and close down some illegal mines and furnaces have had an impact, too.

Enter Chai Jing, a well-known former anchor for state-run China Central Television, whose 104-minute long documentary “Under the Dome” was released online just days before the NPC meeting convened.

It was passionate and hard-hitting, well-researched and slickly produced.

Chai framed her concerns as the mother of a newborn girl, worried about the poisons her daughter and countless Chinese children were breathing in. Made with the support of officials from the Ministry of Environmental Protection, it exposed their powerlessness to set adequate standards and enforce those that exist. It described a ministry that was toothless against a steel industry that ignores environmental rules yet can’t be challenged because it employs tens of millions of people; helpless against powerful state-run oil companies selling dirty fuel to raise their profits; and unable even to stop trucks belching thick plumes of smoke from infesting Beijing’s streets.

But the film also offered hope, in the experience of London and Los Angeles in cleaning the air without damaging the economy, and hope in the power of public participation to shame polluters.

It was released Feb. 28 and promoted by the state-run People’s Daily Online Web site. By the next day, it had garnered 100 million views, even as the first instructions were being issued to state media outlets not to promote it.

The new environmental protection minister, Chen Jining, who had been parachuted into government from academia just a month before, sent Chai a text message that day congratulating her. He told reporters that the film reminded him of “Silent Spring,” the 1962 book by Rachel Carson that inspired the U.S. environmental movement.

The film may not go down in history in quite the same way as Carson’s book, not least because no comparable environmental movement will be allowed in China. Nor was it the first time that eyes had been opened here.

Still, Chai’s film has informed and energized the debate, asking “questions that were on everybody’s mind but had been suppressed,” said Xiao Qiang, an adjunct professor at the University of California at Berkeley and founder of the China Digital Times Web site.

Yet by exposing some of the vested interests behind the smog, the film probably put important noses out of joint; its viral reception also may have shocked and frightened the party hierarchy.

While the initial social media reaction had been very positive, online attacks on Chai, both personal and factual, mounted in subsequent days. By March 6, censors ordered it removed from the Chinese Internet entirely: it can still be viewed on YouTube, with English subtitles, but that Web site is blocked in China.

Xi agreed to a landmark deal with President Obama last November to limit greenhouse gas emissions. The question now is how fast and how far he is prepared to move to address the issues raised by “Under the Dome.”

Xiao says the president’s agenda is driven by a desire for popular support. But while addressing air pollution will win him credit among the middle class, Xi will be wary of undermining the economy and causing discontent in the country’s industrial heartland, experts said.

Xi also will be wary of the risk that public unhappiness over the environment could translate into discontent with one-party rule. Yet environmentalists worry that a top-down approach to fighting pollution will be much less effective than one in which the public is allowed to participate.

“Xi needs popular support, but he is afraid of the public having real participation,” said Xiao, adding, “The party wont let anything generate the public conversation or set the agenda without them driving it.”

Xu Yangjingjing and Liu Liu contributed to this report.

China, U.S. agree to limit greenhouse gases

Dramatic photos illustrate China’s ‘inconvenient truth’ about its hideous air

Study: Pollution from Chinese factories is harming air quality on U.S. West Coast