– Waving German flags, with some flashing Nazi salutes, the angry mob made its way through the streets, chasing after dark-skinned bystanders as police officers, vastly outnumbered, were too afraid to intervene.

A Syrian refugee and father of two, Anas al-Nahlawie, watched horrified from a friend's fourth-floor balcony. They were hunting in packs for immigrants just like him, he said. "Like wolves."

For a few perilous hours over two days this week, the mob owned the streets of Chemnitz, where anger exploded after word spread that an Iraqi and a Syrian asylum-seeker were suspected in a knife attack that killed a German man early Sunday.

Chemnitz, a city of some 250,000 in eastern Germany, has a history of neo-Nazi protests. Usually they draw a few hundred from the fringes of society — and far larger counterdemonstrations, city officials say. The crowd this time was 8,000 strong. Led by several hundred identifiable neo-Nazis, it appeared to be joined by thousands of ordinary citizens.

The city had never seen anything like this — and, to some degree, neither had post-World War II Germany. The rampage now stands as a high-water mark in the outpouring of anti-immigrant hatred that has swelled as Germany struggles to absorb the nearly 1 million asylum-seekers who arrived in the country after Chancellor Angela Merkel decided to open the borders in 2015.

That decision sharply divided Germany, with critics soon arguing that Merkel's administration had lost control of the situation. Three years later, what the government is struggling to control is an anti-immigrant backlash.

Neo-Nazis are growing bolder and stronger, and they are better organized, officials and sociologists say. The far-right Alternative for Germany party is a growing power in Parliament — another shock to the system — and has started to normalize angry sentiments about immigrants that before would not have been uttered aloud, bringing them into the mainstream.

In the face of this newly assertive far right, Chemnitz has become a test of state authority. Some say it has even become a test of Germany's postwar democracy.

"They are challenging our democratic state in a way they have not done before," said Barbara Ludwig, the mayor of Chemnitz, a Social Democrat, sitting in her second-floor city hall office one recent morning. "We must pass this test."

That is precisely what the groups behind last week's disorder see: a pivotal moment they want to use to change the direction of Germany.

Benjamin Jahn Zschocke, 32, a leading member of Pro Chemnitz, the nationalist citizens' movement that registered Monday's march, described the week's events as a turning point and drew two historical parallels.

Just as the death of a student demonstrator in 1967 set off widespread rioting and ultimately a student revolt that marked the beginning of the liberal progressive era in West Germany, the murder in Chemnitz would mark the beginning of a period of far-right resistance, he predicted.

And just as in 1989, when thousands — including his own parents — took to the streets to demand the end of communism, last week's marches were aimed at bringing down a "failed system," he said.

"People were sick of the system then and now they are sick of the system again," he said, adding that he had never voted and did not believe in parliamentary democracy.

Neo-Nazis have a long tradition of holding demonstrations in Chemnitz, the mayor said. For years, they would take to the streets on March 5, mourning the day the city was bombed by Allied forces in 1945. "But they were always in the hundreds, and the counter-demonstration was always bigger," Ludwig said.

Last week was different.

"This mix of far-right extremists and AfD voters was new," said Hajo Funke, a political scientist at the Free University of Berlin and a veteran expert of the far right.

The Alternative for Germany garnered 27 percent in the eastern state of Saxony, where Chemnitz is located, in last year's national election. Empowered by that success, far-right activists have been able to channel the fears and discontent of voters and, often using social media, mobilize crowds that a few years ago would have been unthinkable, Funke said.

The events in Chemnitz, analysts say, showcase the symbiotic relationship between the neo-Nazis and the Alternative for Germany, which officially distances itself from such groups.

The party has done a lot to normalize the language of the far right. If the slogans heard on the streets of Chemnitz last week — from "lying press" to "Germany for the Germans" — have lost their shock value, it is because variations of them are now regularly heard in Parliament.

"We have a strong neo-Nazi scene in eastern Germany, but we also have a strong current of far-right extremism in all of Germany — not just in Parliament but in society," said Matthias Quent, who runs an institute that studies democracy and civil society in the eastern state of Thuringia.

That is why the far right is so self-confident, he said: "They think their day has come."

Social media played a significant role in mobilizing the mobs.

Within hours of the stabbing last Sunday, soccer hooligans with links to the neo-Nazis posted an appeal online: "Let's show together who has the say in this city."

Soon rumors started circulating. The victim had been defending a woman who had been molested by the killer. A second victim had died in a hospital. Neither was true. But within a few hours, some 800 protesters were on the streets, outnumbering the police 10 to one.

The AfD was quick to chime in. "When the state can't protect its citizens anymore, the citizens take to the street and protect themselves," Markus Frohnmaier, a lawmaker for the party, said in a Twitter post. "Today it is a citizen's duty to stop the deadly 'knife migration!' "

The feeling of insecurity was palpable last week in Chemnitz.

At the scene of Sunday's murder, Wolfgang Grosser, 61, and his wife, Sabine, were lighting a candle. The victim was a friend of their son's.

"He did not deserve this," Grosser said. "He was the nicest possible human being."

"We don't feel safe in our own city anymore," he said.

"No one bothers calling the police anymore," Grosser said. "They are totally overwhelmed and don't come anyway. So what's the point?"