Thousands of opponents and supporters of German Chancellor Angela Merkel's immigration policy have marched through the eastern city of Chemnitz after a wave of racist violence that followed a knife killing.
The rallies drew about 8,000 people on Saturday, according to police, and ended peacefully.
Far-right protesters paraded with large portraits of victims of attacks perpetrated, they claimed, by asylum-seekers.
Some chanted "Merkel must go" and "We are the people" while waving German flags.
Rival demonstrators, meanwhile, brandished banners reading "Chemnitz is neither grey nor brown" and "Heart instead of hate".
A total of 1,800 police officers were deployed in the city to keep the groups apart.
Saturday's protests drew about 4,500 far-right supporters from various movements including the far-right anti-immigration Alternative for Germany (AfD) party and the anti-Islam PEGIDA movement, according to police estimates.
Another 3,500 marched in support of Merkel's immigration policy, which has seen more than one million migrants and refugees allowed into Germany since 2015.
The leftist groups accuse the AfD and PEGIDA of exploiting the stabbing of a 35-year-old German carpenter, allegedly by asylum seekers, last month - to stoke hatred against migrants and refugees.
|Rival demonstrators brandished banners reading "Heart instead of hate" [Monika Skolimowska/ AFP]|
There were outbreaks of street violence last week, after two men - one Iraqi and one Syrian - were arrested over the fatal stabbing.
Mobs launched random street attacks against people they took to be foreigners, including an Afghan, a Syrian and a Bulgarian man.
Chemnitz's mayor, Barbara Ludwig, took part in the left-wing protest.
The government lent its support to the pro-refugee rally through Foreign Minister Heiko Maas who tweeted: "The Second World War started 79 years ago. Germany caused unimaginable suffering in Europe. If once again people are parading today in the streets making Nazi salutes, our past history forces us to resolutely defend democracy."