It was anything but a show of unity in Dresden on Oct. 3, the Annual Day of German Unity, which marked the 26th anniversary of the reunification of East and West Germany.

Crowds shouted “traitor” and called for Chancellor Angela Merkel’s resignation, voicing their dissatisfaction with her decision to welcome more than 890,000 refugees, mainly Muslims, into Germany last year. Most of the refugees came from Syria. Others were from North Africa, Eritrea and Afghanistan.

In May, a poll showed that 73 percent of Germans feared the arrival of so many Muslims would lead to increased terrorism. In July, there were five unconnected terror attacks by Muslim perpetrators. A Syrian refugee’s plot to bomb a Berlin airport this month was thwarted, but it heightened fears further.

Critics say Merkel failed to recognize the enormous challenge of integrating large numbers of people from different cultures.

“Merkel is seen as the incarnation of the refugee problem,” said Malte Lehming, editor at Der Tagesspiegel, a respected liberal Berlin newspaper.

“She did not see the consequences of her refugee policy,” he said.

One example is the tremendous backlog in processing refugee applications. The Frankfurter Allgemeine Zeitung reported recently that there are 250,000 migrants who sought refugee status last year whose applications will not be processed until next year.

Merkel acknowledged last month that her decision to accept so many refugees should have included better preparation for their arrival. Now she is trying to dial back her policies. The government has tightened the asylum law and plans to deport economic refugees from non-conflict areas.

“This simply means they are trying to seal the country off by every possible means – laws, agreements with other countries, ongoing border controls,” said Felix Stein, an analyst for Deutsche Welle, Germany’s public international broadcaster.

The refugee influx has led to increased violence against immigrants, which jumped by more than 40 percent last year, according to the Ministry of Interior.

Supporters of the immigrants have also been attacked, including the mayor of Oersdorf, a small town in northern Germany, who was beaten unconscious after he spoke in favor of the asylum seekers.

Merkel’s refugee policy has affected Germany’s mainstream political parties. While support has waned for her conservative Christian Democratic Party (CDU) and for the left-of-center Social Democrats (SPD), the populist, anti-Muslim Alternative for Germany (AFD) has made significant gains. Now represented in nine of Germany’s 16 states, it recently got more votes than the CDU in Merkel’s home state of Mecklenburg, and it forced the CDU out of its governing position in Berlin, leading to a left-wing coalition government.

“The success of the AFD is a direct result of Merkel letting in so many refugees,” Richard Herzinger, an opinion writer for the conservative daily Die Welt, said in a telephone interview.

He predicted the AFD’s stunning growth at the expense of the CDU will lead to more left-wing coalition governments, as in Berlin.

Author Julia Schramm, a Left Party member who initially applauded Merkel’s decision to open Germany’s borders, now criticizes the chancellor for failing to provide the necessary resources to settle the refugees. She also faults Merkel for supporting a European Union deal that encourages Turkey to stop the flow of Syrian refugees.

The Christian Social Union (CSU), a Bavarian sister party to the CDU, has also criticized Merkel’s refugee policy.

“We have a humanitarian responsibility to take in some refugees, but we also have an obligation to maintain secure borders,” said CSU member Christian Forstner, who blames the AFD’s success on the government’s failure to control the refugee influx.

The AFD has turned Islamophobia into a potent political force in Germany. AFD leader Frauke Petry told the press in April that Islam does not belong in Germany and that Muslims threaten German values. In 2013, the AFD was a fringe party. Today, it’s the strongest right-wing party in Germany.

“If there was not a refugee crisis, the AFD’s popularity would only amount to 6 percent of the population,” said Lemming, who predicts the AFD will approach 17 percent of the vote in next year’s national election and will have seats in the Bundestag for the first time. It’s unclear whether Merkel will seek reelection.

Also unclear is the impact of the refugee crisis on the chancellor’s legacy.

Will she be remembered as creating the pivotal moment in a terrible xenophobic backlash? Or will history record her response to the refugee as a bold and courageous humanitarian response from the leader of the nation that caused the horrendous upheaval of World War II?

Much depends on whether the German people are willing to welcome these refugees into their society.