(CNN) -- Two officials in southwestern China have been replaced for "severe malfeasance" after a protest involving about 30,000 people descended into a riot, the state-run Xinhua news agency reported Friday.
Demonstrators burned more than 160 offices and 40 cars in an incident that injured more than 150 police and protesters, the news agency said. The riot happened June 28 in Weng'an County of Guizhou Province.
People angry by investigators' handling of a teenage girl's death targeted a police station and government building. The police said at first that the girl -- Li Shu Fan -- drowned, but her family said she was raped and murdered, Xinhua reported.
Authorities re-opened the case after the riot.
On Friday, Xinhua reported that the director of the county's public security bureau, Shen Guirong, and a political commissar, Luo Laiping, had been replaced. The agency cited reports in the Guizhou Daily.
Xinhua quoted Wang Fuyu, a provincial party chief, as saying that the protests would not have happened "if local officials had communicated appropriately with the aggrieved people after the first sign of protest emerged."
The unrest came as China prepares to welcome thousands of international visitors for the Olympic Games, which are scheduled to start August 8 in Beijing.
In March, thousands of anti-Chinese demonstrators rioted in the Tibetan capital, Lhasa. Estimates of the death toll ranged from 18 to 140.
Rioters looted business and burned homes, stores and vehicles. Pro-Tibetan demonstrators also dogged the Olympic torch relay in several cities around the world.
In addition, many parents have complained publicly about shoddy construction and have threatened to sue the government after several schools collapsed during a devastating earthquake that struck southwestern China on May 12.