It follows the fatal stabbing of a German man that authorities blamed on a Syrian and an Iraqi.
Germany will not tolerate "vigilante justice", Chancellor Angela Merkel's spokesman said on Monday, after hundreds of far-right protesters staged a violent demonstration following a fatal stabbing that authorities blamed on a Syrian and an Iraqi.
Sunday's protest in the eastern city of Chemnitz was the latest manifestation of unrest since Merkel's government allowed about 1 million asylum seekers to enter Germany in 2015, triggering a shift to the right in German politics.
Television news channels broadcast amateur footage of skinheads chasing a foreign-looking man through the streets.
Other clips showed hundreds of demonstrators shouting "We are the people!", a slogan used by far-right supporters.
Police said around 800 demonstrators had taken to the streets on Sunday, hours after one man was killed and two other people were injured in the stabbing incident overnight.
Local police were trying to avert further violence as dozens of far-right demonstrators and hundreds of leftist protesters staged separate rallies in the city on Monday evening.
"We don't tolerate such unlawful assemblies and the hounding of people who look different or have different origins, and attempts to spread hatred on the streets," Merkel's spokesman Steffen Seibert told a regular news briefing.
"That has no place in our cities and we, as the German government, condemn it in the strongest terms," he said. "Our basic message for Chemnitz and beyond is that there is no place in Germany for vigilante justice, for groups that want to spread hatred on the streets, for intolerance and for extremism."
Roland Woeller, interior minister of the state of Saxony, which includes Chemnitz, said authorities would not allow "anarchists" to run rampant. He urged all sides to remain calm and rely on official police information for updates, saying that "misinformation and lies" were circulating in social media.
Police said the stabbing occurred after a row, but gave no further details. Local prosecutors said on Monday they had arrested two suspects, a 22-year-old Syrian man and a 21-year-old Iraqi man.
No additional details were immediately available about the two men.