Police used tear gas and water cannon to clear a rally of the xenophobic PEGIDA movement in Cologne, after protesters flung firecrackers and bottles at officers they accuse of failing to prevent assaults during New Year's festivities in the western city.
As outrage grows in Germany over the attacks, Merkel declared that any refugee handed a jail term -- even if it is only a suspended sentence -- should be kicked out of the country.
"If the law does not suffice, then the law must be changed," she said, vowing action to protect not just German citizens, but innocent refugees too.
Germany was stunned by revelations that hundreds of women ran a gauntlet of groping hands, lewd insults and robberies in mob violence in Cologne on New Year's Eve.
Most of the assailants were of Arabic or North African background, according to eye-witnesses, police and media reports.
The majority of suspects identified by federal police so far are migrants, adding fuel to criticism of Merkel's liberal migrant policy -- which brought 1.1 million new asylum seekers to Germany last year.
Waving German flags and signs meaning "Rapefugees not welcome" and "Germany survived war, plague and cholera, but Merkel?", hundreds of PEGIDA supporters shouted "Merkel raus" (Merkel out), before the protest briefly turned violent.
The rattle of a helicopter circling in the skies and the occasional bang of a firecracker added to tensions as counter-protesters, separated from the PEGIDA crowd by police, chanted "Nazis raus".
Earlier some 500 mostly female protesters had also held a noisy rally against sexist violence.
Banging pots and blowing whistles, demonstrators waved signs in German saying "No violence against women" and "No means no! It's the law!" while others read: "Protect our women and children."
'Cologne changes everything'
The mob violence has played into popular fears, and threatened to cloud what had been a broadly welcoming mood in Germany where crowds cheered as Syrian refugees arrived by train in September.
Germany's conservative Die Welt newspaper said January 6, the day the scope of the violence became clear, "marks the beginning of a change in immigration policy" in an article outlining both "the benefits and the dangers of mass immigration from Muslim countries."
Ahead of the afternoon rally, Lutz Bachmann, co-founder of PEGIDA ("Patriotic Europeans Against the Islamisation of the Occident") posted a photo of himself online wearing a t-shirt saying "Rapefugees not Welcome".
In a similar vein, the populist right-wing Alternative for Germany party, which polls show as having 10 percent support ahead of state elections this year, claimed the violence gave a "taste of the looming collapse of culture and civilisation".
Suspects include asylum seekers
Details of what happened in the frenzied crush remain hazy.
Germany's federal police have identified 32 suspects, 22 of whom are asylum seekers, in connection with 76 offences, 12 of which had a sexual character, the interior ministry said Friday.
Cologne police, which has around 100 investigators scanning some 350 hours of video, says it has identified 16 suspects.
It was unclear how many of the suspects had been in Germany long-term or belonged to a scene of drug dealers and pickpockets known to lurk around the railway station, and how many were newly-arrived asylum seekers.
On Friday, criticism over the police's failure to stop the violence claimed the scalp of Cologne police chief Wolfgang Albers in a bid to "restore public confidence".
'Do this for us'
Merkel, who has so far refused to abandon her welcoming stance towards refugees, on Saturday had tough words for law-breakers.
"If a refugee flouts the rules, then there must be consequences, that means that they can lose their residence right here regardless of whether they have a suspended sentence or a prison sentence," she said after a meeting with the top ranks of her party.
Under current laws, asylum seekers are only deported if they have been sentenced to jail terms of at least three years, and if their lives are not at risk in their countries of origin.
"We must do this for us, and for the many refugees who were not part of the events in Cologne," she said.
Interior Minister Thomas de Maiziere said talks were already ongoing with the Justice Minister on this front.
"Foreigners convicted of serious offences or serial offences must leave Germany," he told the Frankfurter Allgemeine Zeitung.