Two dozen people, half of them German nationals, were arrested provisionally, as police reported 19 colleagues hurt.
“They were unbelievable scenes that have left me speechless. In my 46 years of police service, I have never experienced this,” said Stuttgart police chief Frank Lutz.
Tensions built up shortly after midnight when officers carried out checks on a 17-year-old German man suspected of using drugs, said Stuttgart deputy police chief Thomas Berger.
Crowds who were milling around at the city's biggest square, the Schlossplatz, immediately rallied around the young man and began flinging stones and bottles at police.
The groups of mostly men also used sticks or poles to smash windows of police vehicles parked in the area.
“I sharply condemn this brutal outbreak of violence, these acts against people and things are criminal action that must be forcefully prosecuted and condemned,” Baden-Wuerttemberg state premier Winfried Kretschmann said in a statement.
At the height of the clashes, some 400 to 500 people joined in the battle against police officers and rescue workers.
As officers pushed back against the crowd, they broke up into small groups, carrying on their rampage around the city centre, smashing shop windows and looting stores along nearby Koenigstrasse, a major shopping street.
Videos posted on Twitter showed people breaking shop windows, leaving goods strewn on the streets.
A jewellery store was completely emptied and a mobile phone shop wrecked, according to regional broadcaster SWR.
In all, nine shops were looted while 14 others suffered damage such as broken windows.
As smaller scale clashes had already broken out downtown last week between police and groups of young people, officers had already bulked up their deployment overnight with an extra 100-strong team.
But the scale of the violence overwhelmed the officers, forcing them to call in reinforcements from other parts of the state.
Only four and a half hours later were they able to quell the violence that has been described as “civil war-like scenes” by Social Democrat regional MP Sascha Binder.
Police on Sunday ruled out any political motives for the rampage, describing the perpetrators as people from the “party scene or events scene”.
An unusually large number of people were in the city centre to enjoy the summer's night because discos and clubs are still shut over he coronavirus pandemic, said Stuttgart mayor Fritz Kuhn.
Some of the rioters were charged up by alcohol, he said, adding that others may have been driven by “the addiction of putting a little film on social media.”
Asked about the nationalities of the 12 non-Germans who were detailed, Berger said they stemmed from a range of countries from Croatia and Portugal to Afghanistan and Somalia.
Calling the riots of “an unprecedented nature,” interior minister for the region Thomas Strobl vowed to “use all available means available under the rule of law to go after the rioters.”