Illustration John Shakespeare To now, the world's most powerful and steadfast advocate of tolerant, open, non-discriminatory immigration has been the Chancellor of Germany, Angela Merkel, the real leader of the European Union. A year ago she was under a great deal of criticism for welcoming a million refugees, mainly Syrian. It was a decision that put extraordinary pressure on her own country as well as Europe more broadly. Yet she remained proud: "I'm happy that Germany has become a country that many people abroad associate with hope," she said. "That is something very valuable, especially in view of our history." But popular anger fed the growth of a new far-right party, Alternative for Deutschland​ or AfD. Its leader is the virulently anti-Islam Frauke Petry​. She has said that the German police should shoot illegal refugees "if necessary".

And, in the past two weeks, Merkel's ruling party has haemorrhaged votes to the AfD in two separate elections. In the most recent, the state election for Berlin, Merkel's Christian Democratic Union polled 17.6 per cent. It was the worst Berlin result for the party in its history. The extreme AfD polled 14 per cent. A party that didn't exist three years ago will now be represented in 10 of the country's 16 state parliaments, including Berlin's, the most liberal and tolerant in Germany. The biggest test, a federal election, is due next year. Berlin's mayor, Michael Mueller, said before the vote that a strong result for the AfD would be "seen throughout the world as a sign of the resurgence of the Right and of Nazis in Germany". In response to result, Merkel gave her first sign of contrition. She didn't admit that the refugee decision itself was wrong, but she said that the huge influx would not happen again. Germany was unprepared, she conceded. To now, her mantra has been "We can do it". But this week, a contrite chancellor said that she would abandon her catchphrase because it had become "almost an empty formula".

She said: "If I could, I would rewind time by many, many years so that I could better prepare myself and the whole government and all those in positions of responsibility for the situation that caught us unprepared in the late summer of 2015." Time magazine crowned her person of the year in 2015 for "the most generous, openhearted gesture of recent history [which has] blossomed from Germany." Now Merkel, the real leader of Europe for a decade, has revoked the gesture: "For some time, we didn't have enough control," Merkel said this week. "No one wants a repeat of last year's situation, including me." The Chancellor's contrition is "hugely important," according to a political sociologist at the London School of Economics, Robin Archer. "The election result left her hugely exposed. Hostility to her position on refugees – it's about 85 per cent – was enormous. And now this has happened in Berlin, the least likely place for this to happen."

With the rise of an angry, populist far right, Germany now appears to be joining France, Sweden, Austria, Denmark, and others. The day after Merkel's change of course, the US President, Barack Obama, hosting a refugee summit in New York, publicly thanked her for throwing open German's door to refugees: "The politics sometimes can be hard, but it's the right thing to do." He was right; the politics turned out to be not just hard but insurmountable for one of the most durable and successful leaders in the world. In a grim perversity, as Obama gave eloquent praise to the principles of tolerance, racial violence broke out anew on the streets of his own country in the now-familiar pattern of white police officer killing unarmed black citizen, provoking demonstrations and yet further violence. In the same week, and in the same city, a naturalised American citizen, an Afghan immigrant who arrived in America as a young boy, was charged with terrorism in New York. And the Islamophobic hate-monger Donald Trump, Republican candidate for the presidency, drew level with Hillary Clinton in the opinion polls.

Malcolm Turnbull was another of the leaders at Obama's summit. He, too, spoke ardently in praise of tolerance. He proudly defined Australia: "We are one of the most successful multicultural societies. We are both as old as the oldest continuous human cultures of our first Australians and as young as the child in the arms of her migrant parents. "We are not defined by race, religion or culture but by shared political values of democracy, the rule of law and equality of opportunity – a 'fair go'." These are fine sentiments and ones that, till now, were generally thought to be true. Yet in the same week that the prime minister delivered them, the poll finding on Muslim immigrants directly challenged them. The polling firm, Essential Media, understood the potency of its finding. It first asked the question in a poll a couple of months ago. Shaken by the result, it decided to test its accuracy and asked the question again. The outcome was confirmation. "The first think that strikes me is how interconnected these ideas are internationally," says Robin Archer of the London School of Economics, an Australian.

"There seem to be these international waves of opinion that don't have strictly domestic definitions." For instance, the French ban on the "burkini" moved opinion in Britain in favour of a ban, too, he says. What explains this big, broad phenomenon? What's happening in the West? When the US financial crisis dragged down European and other economies in 2008, "the question was, is this a 1929, or not?" poses Archer. In other words, was economic collapse about to breed an angry, xenophobic populism as it did in Europe in the 1930s, a precursor to World War II? "For some years, it wasn't clear what would happen." But now with Brexit, Trump, the far right rising across most of Europe, "there's something going on more generally – a post-crisis ideological realignment is taking place," Archer tells me. "We're in the middle of it so we can't tell how it will work out." In Australia, the post-crisis realignment seems to be under way, even though Australia didn't actually suffer a crisis. Not one bank failed; the economy did not falter; 25 years of unbroken growth is a standout achievement.

Yet this has not insulated Australia against division and xenophobia, if the Essential poll is even half right. Archer explains this through the prism of terrorism. "To me, the terrorism issue is the nuclear weapons issue of our age – it's perceived as catastrophic, but rarely, if ever, happens." It is powerfully polarising, he says, and, of course, it's intimately connected with perceptions of the Islamic communities of the Western world. We can expect – and demand – that the leaders of the main political parties will defend Australia's social cohesion. In a multicultural, many-hued society, it is a profound national interest. Asked about the Essential poll on Friday, Bill Shorten turned it into a challenge for the government: "It's time for Malcolm Turnbull to tell Australians which side he is on. Is he on the side of the people who split and divide our country, or is he on the side of the rest of us, who know that we're a great country and we do best when we bring people into it and involve everyone?"

Turnbull has shown repeatedly that, while harsh on terrorism, he is an advocate for tolerance and unity. Shorten and Turnbull and all leaders need to protect this deep national equity. Yet we now know that this, while necessary, is not sufficient. Australia is on the cusp of joining the West's dangerous crisis of cohesion. Peter Hartcher is political editor.