Police have released three people detained earlier this week for throwing flower pots, bricks and stones at officers during a protest against an alloy copper plant project, according to authorities in south-west China.

The Shifang city government in Sichuan province also announced on Thursday that an official was appointed as the city's first party chief, a leadership change that may indicate further investigation into the protest.

Thousands of local residents gathered in front of the city government building and in a public square on Sunday, concerned over the copper project's environmental and public health risks. Many were high school and college students.

The protest turned violent when riot police moved in on Monday. Police used teargas, stun grenades and batons to disperse crowds. Several dozen people were injured, and police took away 27 demonstrators. The use of force stoked fresh anger from residents, who also demanded the release of those detained.

By Tuesday, police had freed 21 people. Three remained in custody on Friday, suspected of smashing and overturning police vehicles during the protests. Shifang city spokesman Chen Lin said none of the three was a student.

Authorities have since scrapped plans for the project and promised the plant will not be built.

Shifang was hit by a earthquake in 2008 that killed nearly 70,000 people and left more than 18,000 missing. City officials said the copper plant project was needed to help Shifang rebuild its economy.