The cracked window of a retail store after riots in Stuttgart, Germany.
CNN  — 

A routine drug arrest in the German city of Stuttgart erupted into violent riots and widespread looting on Saturday night, leaving 24 rioters arrested and 19 police officers injured, said city authorities.

Stuttgart Mayor Fritz Kuhn condemned the riots, calling the violence “unacceptable,” and reiterating his support for law enforcement. The riots had crossed a line that neither alcohol nor the will to show off on social media could excuse, he said in a statement Sunday, warning that “violence against emergency services is not tolerated.”

The unrest began after police officers conducted checks in the city center relating to reports of drug dealing. After police carried out a preliminary arrest, a crowd of partygoers in the surrounding area allegedly attacked the officers in “solidarity” with the detained suspect, according to a statement from the city government.

Police officers responding to riots in Stuttgart, Germany.

The police were initially able to push back the crowd using pepper spray, but tensions escalated quickly, said the statement. At one point, several hundred people were facing off against the police, throwing stones, bottles, and other objects picked up from a construction site.

Rioters, moving through the city in small groups, also targeted city property by damaging billboards and spraying graffiti. At least 30 stores were damaged, and nine reported looting. 12 police patrol cars were “massively damaged,” said the government statement.

“Vehicles were hit with poles, posts and windows were smashed,” the police said.

Around 300 police officers were deployed in response, including federal police. The unrest finally began dying down in the early hours of the morning, just before dawn.

Hundreds of rioters in small groups looted stores and clashed with police in Stuttgart.

Police say they have arrested 24 suspected rioters, about half of which are German. 19 officers have also been injured, with one “unable to continue working” due to a sustained hand injury.

Police President Franz Lutz called the riots “an attack on the entire city,” adding he had never seen anything like it in his 46 years as a police officer.

He also pointed to drunkenness and online influence on social media as factors that drove the riots, and said he would strengthen police forces in downtown Stuttgart these next few weeks.

“Stuttgart is fully behind the police,” said Mayor Kuhn in the statement. “There is no getting used to such an outbreak.”

A police task force is now investigating the riots, and further arrests are expected.

CORRECTION: This story has been updated to accurately reflect when the riots took place.