At least nine people have been injured as thousands of opponents and supporters of German Chancellor Angela Merkel's immigration policy marched through the eastern city of Chemnitz after a wave of racist violence that followed a knife killing.
The rallies, which drew 8,000 people according to police, ended peacefully although there was palpable tension at times during the evening.
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.

Holding German flags and chanting the far right groups descend on the town. Source: AP
Anti-fascist demonstrators, meanwhile, brandished banners reading "Chemnitz is neither grey nor brown" and "Heart instead of hate".
There was a heavy police presence with reinforcements from all over Germany after they were outnumbered by thousands of neo-Nazis, football hooligans and other extremists earlier this week.
But police said 25 criminal offences, including damage to property, resisting arrest and the use of insignia of a banned organisation, had occurred.
Scuffles between demonstrators and police had left nine people injured.
Sunday and Monday evenings saw outbreaks of street violence, triggered by the arrest of one Iraqi protester and one Syrian, suspected of stabbing a 35-year-old carpenter to death.

Police surround the two groups as the protests turn ugly. Source: AP
Following the arrests, mobs launched random street attacks against people they took to be foreigners, including an Afghan, a Syrian and a Bulgarian man.
Saturday's protests drew around 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.

German police lead a man away into custody as far right groups clash with police and migrant groups. Source: AP
The government lent its support to the pro-migrant 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."
"We will not let right-wing extremists destroy our country and our democracy. Neither in Chemnitz, nor in Saxony nor anywhere in Germany. Our constitution must prevail. We must defend it. Now!" added one of the Greens' leaders Cem Ozdemir in a tweet accompanied by a picture of him with demonstrators.
The violence and heated debate on immigration have brought back to the fore what has become the most challenging political issue for Merkel, especially in the former communist east of Germany where the AfD is the number one party in some towns and regions.
Following criticism of Merkel's earlier open door policy, her government has increasingly tightened asylum laws as conservative and far-right disquiet has grown.
After an initially jubilant welcome, the migrant influx sparked a strong backlash that saw a spate of hate crimes and swept once-fringe party AfD into parliament.
Migrant crisis haunts EU three years after Merkel's fateful call
German Chancellor Angela Merkel won accolades for her stunning call on September 4, 2015 to keep open Germany's doors to hundreds of thousands of asylum seekers, many fleeing war-torn Syria or Iraq.
Three years on, scenes of far-right protesters chasing down foreigners have shocked the world.

German Chancellor Angela Merkel speaks with Greek Prime Minister Alexis Tsipras, second right, and European Parliament President Martin Schulz. Source: AAP
Despite her "we can do it" rally cry, Merkel has since agreed to toughening restrictions to curb new arrivals, while the EU as a bloc is seeking to stop migrants landing on its soil.
As a result, the influx has slowed considerably.
In Germany, which recorded 745,545 asylum applications in 2016, just 93,316 were registered for the first half of this year.
Some headway also appears to have been made on integration.
One in four asylum seekers who arrived in Germany since 2015 have since found work, according to data released in May by the employment ministry's think-tank IAB.
Nevertheless, "migration remains the biggest challenge" for the bloc, noted Stefan Lehne, visiting professor at Carnegie Europe.
"While the numbers of arrivals are down, the hysteria is up, as populist movements and a growing number of mainstream politicians are building their business model on anti-migration sentiments."