BEIJING—Hundreds of people angry at a debt-laden Chinese city’s plans to deal with overcrowded public schools clashed with police in a protest that shows the social tensions beneath China’s long-running local-government debt problems.

More than 600 people gathered Saturday night outside police headquarters in Leiyang to express their outrage over a plan to force some students to attend private school. Some threw water and beer bottles, bricks and firecrackers at police officers and local officials, the police said in a news release on Sunday.

“We tried to film it with our phones, but we decided to run. People were pushing each other and there was no place to go. It was terrifying,” Leiyang resident Liu Yun said. “Later, the fighting started. A bunch of children got hurt.”

More than 30 police personnel were wounded in the clash, the gate to the police compound was damaged and several cars were smashed up, according to the news release, posted on a verified police social-media account. Authorities detained 46 people believed to have led attacks on police, said.

Leiyang, which sits in coal-mining country in southern Hunan province, has seen its finances deteriorate over the past year as the coal industry went into a slump while city-backed companies racked up debts to redevelop slums and attract new businesses. In May, the city didn’t have enough money to pay civil servants, until the province dispatched emergency funds, according to the Leiyang government.

After a rapid increase in debt by local governments and government-backed financing companies, Chinese leaders have for the past two years battled to contain further debt by restraining attempts to borrow more. But flagging economic growth this year has made repayment harder, forcing the government to step in and help struggling state-backed firms. In August, a financing vehicle for a paramilitary organization in far west Xinjiang missed repaying interest and principal on $73 million in bonds, sparking investor jitters about more defaults.

Saturday’s protest in Leiyang was triggered by parents dissatisfied with a government plan to reduce class sizes in public schools, police said.

Under the plan, all fifth and sixth grade students in public schools would be required to attend private schools instead, according to an employee at tutoring-services firm Yixue Education Consulting, who said he has been communicating with local parents. The move, in effect, forces families out of the government-funded public-education system and into the private-school system, where fees are higher.

Some of the private schools also recently underwent renovations, and some parents were worried about reports of unhealthy levels of formaldehyde in the school buildings, the consultant said.

Repeated phone calls to the Leiyang Public Security Bureau rang unanswered on Sunday. The Leiyang Communist Party Committee didn’t answer phone calls or immediately respond to an email seeking comment.

A summary of the parents’ complaints that Yixue published Sunday on the popular WeChat messaging platform was quickly taken down, with a notice saying it was in violation of the rules. Photos and video of protests circulating online, which couldn’t be verified, showed protest banners reading “I want to attend public school” and “Boycott private schools.”

In its annual report to the local legislature in February, the Leiyang government nodded to the widespread consequences of its growing debt.

“Contradictions in financial income and expenditures are unusually prevalent,” the report said. “We continue to face no shortage of challenges in education, employment, health care, housing and other areas that directly touch on the personal interests of the masses.”

On June 4, local officials meeting to address the school problems noted that Leiyang’s public schools had 740 classes that were above the nationally mandated limit of 65 students per class, according to an official summary of the meeting. To meet national standards, the city would need to add classes with the capacity to take 10,700 students, according to the summary, which has been removed from the Leiyang government website.

Liu Yun, the Leiyang resident who witnessed the protests, said Saturday’s crowd was likely larger than the police estimate. She said several parents who went to the government offices to complain about the new policies on Friday were detained, which led others to march to the police compound Saturday to demand their release.

The Leiyang Public Security Bureau said only one of the protesters detained after the clashes Saturday night was a parent. It said most were “social malingerers,” including six people with criminal records.

Ms. Liu doubted the involvement of “criminal elements” and complained that she and other residents were being censored on social media.

“We can’t send out any information,” she said. “As soon as we put it out, it’s immediately taken down.”