NINGBO, China -- Thousands of protesters who marched through an eastern Chinese city on Sunday against the expansion of a petrochemical factory won a pledge from the local government that the project would be halted.

The protest, which comes at a sensitive time in China's political calendar, had swelled over the weekend and led to clashes between citizens and police. The Ningbo city government said in a statement Sunday evening that they and the project's investor had "resolutely" agreed not to go ahead with the expansion. The factory is a subsidiary of Sinopec, one of the biggest petrochemical companies in the world.

Outside the government offices where crowds of protesters remained, an official tried to read the statement on a loudspeaker but was drowned out by shouts demanding the mayor step down. On the third attempt, the crowd briefly cheered but then turned back to demanding that authorities release protesters being held inside.

Liu Li, 24, a Ningbo resident, said the crowd did not believe the government's statement.

"There is very little public confidence in the government," she said. "Who knows if they are saying this just to make us leave and then keep on doing the project."

The city government was likely under great pressure to defuse the protest with China's leadership wanting calm for a party congress next month at which the country's new leaders will be named. It was unclear whether local authorities will ultimately cancel the project or continue it when the pressure is lower.

Hundreds of people outside the government offices refused to budge despite being urged to leave by officials. Riot police with helmets and shields then came out of the government compound and pushed the crowd back. Some people including families ran away. Police dragged six men and one woman into the compound, beating and kicking at least three of them. Police also smashed placards and took away flags.

The crowd roared for the protesters' release. Police also briefly detained ITN correspondent Angus Walker outside the offices.

The demonstration in wealthy Zhejiang province is the latest this year over fears of health risks from industrial projects, as Chinese who have seen their living standards improve become more outspoken against environmentally risky projects in their areas.

"The government hides information from the people. They are only interested in scoring political points and making money," said one protester, Luo Luan. "They don't care about destroying the environment or damaging people's lives."

The protests began a few days earlier in the coastal district of Zhenhai, where the petrochemical factory is located. On Saturday they swelled and spread to the center of Ningbo city, whose officials oversee Zhenhai.

Residents reported that Saturday's protests involved thousands of people and turned violent after authorities used tear gas and arrested participants.

Authorities said "a few" people disrupted public order by staging sit-ins, unfurling banners, distributing fliers and obstructing roads.

Early Sunday, thousands of residents began gathering outside the offices of the municipal government. Hundreds marched away from the offices in an apparent effort to round up more support along nearby shopping streets. Police diverted traffic to allow them to pass down a main road.

The crowds in Ningbo are a slice of China's rising middle class that poses an increasingly boisterous challenge to the country's incoming leadership: Armed with expensive smartphones, Internet connectivity and higher expectations than the generations before them, their impatience with the government's customary lack of response is palpable in every fist pump and every rendition of the national anthem they shout.

A 30-year-old woman surnamed Wang said officers took her to a police station Saturday and made her sign a guarantee that she would not participate in any more protests, but she came back Sunday anyway.

"They won't even let us sing the national anthem," Wang said. "They kept asking me who the leader of the protests was and I said that this is all voluntary. We have no leader."

In a sign that censors were at work, the name "Zhenhai" - the city district where the factory is located - was blocked on China's popular microblogging site Sina Weibo, and searches for "chemical expansion project" were greeted with the line that "Some search results are not shown according to regulations."

Protester Yu Yibing said he wanted the factory to be closed and his 7-year-old son to grow up in a clean environment.

"As the common people, we need to live in a green environment. This is a reasonable request," Yu said. "But the government only puts out some statement and refuses to see us and also suppresses us. I don't know how else we can express our views."

The Zhenhai district government, which comes under the Ningbo government, said Ningbo's Communist Party chief, Wang Huizhong, and mayor, Liu Qi, had held discussions with local residents Saturday night.

It said in a short statement on its website Sunday evening that the project wouldn't go ahead and that refining at the factory would stop for the time being while a scientific review is conducted.

The official Xinhua News Agency said the planned project was designed to produce 15 million tons of refined oil and 1.2 million tons of ethylene per year and belongs to Sinopec Zhenhai Refining & Chemical Co., which has invested 55.87 billion yuan ($8.9 billion).

Calls to Zhenhai police and the propaganda department of Ningbo police rang unanswered Sunday.

Past environmental protests have targeted a waste-water pipeline in eastern China and a copper plant in west-central China. A week ago, hundreds protested for several days in a small town on China's Hainan island over a coal-fired power plant.