Demonstrators took to the streets Saturday in a town north of Shanghai to contest plans to build a wastewater pipeline from a Japanese-owned paper mill, the latest case of large-scale environmental protest in China. The government of Qidong, which had earlier said the project would be suspended, announced Saturday that it would be cancelled, but only after a huge show of people power and clashes between demonstrators and authorities.

Photos of the protest, which were widely circulated on Chinese social media networks, showed demonstrators occupying local government offices. Some images showed police being assaulted and a man described as the municipal party secretary surrounded by a crowd and stripped of his shirt. The authenticity of the photos couldn’t be immediately confirmed.

The protesters were infuriated by plans to pump tons of wastewater from the Jiangsu Oji Paper mill in Nantong to Qidong, a county-level city 100 km to the southeast that sits on the northern Yangtze River delta. The company downplayed concerns, saying that wastewater treatment at the $900 million plant, which was completed in 2011, was extremely strict and meets China’s national standards. But those assurances did little to mollify residents, who expressed concern about potential harm to the local fishery. The local government warned residents not to march Saturday, but they turned out despite the threat of punishment.

Qidong protest organizers cited the success of residents in the southwestern Chinese city of Shifang, who succeeded in blocking a copper and molybdenum smelter after days of huge protests in early July. Last year residents of the coastal city of Dalian rallied to shut down a plant that produced paraxylene, just as protesters in Xiamen did five years ago. The Qidong movement seemed to be an even more refined version of those earlier protests, with slickly produced graphics and even a version of the “Hitler Reacts” internet meme, in which a scene of the Nazi dictator ranting in the 2004 film Downfall is re-subtitled, in this case to complain about the possibility of pollution from the Oji mill.

But on Saturday the protests took on a ugly tinge. A Reuters report from the scene described demonstrators in a government building smashing computers and throwing documents out windows, and at least five cars and one minibus overturned. Two police officers were “punched and beaten enough to make them bleed,” the news service said.

The success in blocking the pipeline project in Qidong will undoubtedly inspire further environmental protests around the country, just as the success of the Shifang protest earlier this month inspired demonstrators in Qidong. But the scenes of violence and officials humiliated and injured in the streets could also heighten authorities’ fears of activism, and may lead to tough measures to dampen future protests.

“Whenever you have any violent confrontations, people may feel the repercussions politically,” says Dali Yang, an expert on Chinese politics at the University of Chicago. “But I do think it will stimulate reflection in terms of public policy making, particularly for those kinds of projects that affect many people, to allow for public comment. Having public participation is extremely important, and things would have not have gone this far in Qidong if they had done so.”