By all accounts, Germany’s elections on Sunday turned out exactly as expected. Angela Merkel cruised to an easy victory. Her fourth term puts her on track to be the longest serving chancellor in the post-Second World War period and second only to Otto von Bismarck as Germany’s longest serving leader.

Beneath the surface, however, the election marked seismic shifts in German politics – shifts that, like an undersea earthquake, may first appear benign until the inevitable tsunami strikes.

Before the election, Germany’s two major parties, the CDU/CSU and the SPD, had between them 504 of the 598 seats in the Bundestag, 311 and 193 respectively. After Sunday’s vote, Germany’s two largest parties held a combined 399 seats. The CDU/CSU lost 65 seats while the SPD lost 40.

They still have a combined count of 399, enough to ensure a majority if they were to choose to once again govern in a grand coalition. That’s not an option this time, however. The right-wing Alternative für Deutschland (Alternative for Germany or AfD) polled 12.6 per cent of the vote and won 89 seats, making it the third largest party in Germany.

If the SDU were to go into a grand coalition with Merkel’s CDU/CSU, then AfD would become the official opposition. Many fear that role would bestow political legitimacy on what has until now been dismissed as a reactionary fringe movement.

Buried in the election results are some significant trends. The AfD polled around 11 per cent in the former West Germany, putting it in fourth place, just behind the Free Democratic Party. In the former East Germany, however, they won 22 per cent of the vote, leaving them in a solid second place. More significantly, they had strong male support.

The AfD has been dismissed by critics as reactionaries and Nazis. Sigmar Gabriel, a former head of the SPD, echoed a widely-made comment in German media and political circles when he observed that, “for the first time since the end of the Second World War, real Nazis will sit in the German Parliament.”

The AfD is opposed to liberal immigration policies and the European Union’s enforcement of national quotas for the resettlement of illegal migrants and refugees. That’s their defining issue. They are nationalistic, xenophobic, anti-EU and have argued that growing immigration into Germany from Third World countries, especially of Muslim immigrants, poses an existential threat to German culture and society.

They certainly have their share of political troglodytes, perhaps even more than their share, but they are not Nazis. They are the German manifestation of the same phenomenon that spurred the Brexit vote in the United Kingdom and that fuelled the election of Donald Trump in the U.S. They are no more Nazis than the millions of voters who supported Brexit or Donald Trump.

Immigration has become the lightning rod for a working class that feels increasingly marginalized and ignored by the political class. Even in prosperous Germany, whose unemployment rate is 3.9 per cent, working-class anxiety is increasingly expressed as anti-immigration and anti-EU sentiment.

It’s not as if working-class jobs are being lost to immigrants, legal or otherwise. The vast majority of the refugees who Germany accepted have still not been integrated into the labour force. Likewise, the decline of blue-collar jobs in the U.S. has been driven by a combination of technological change and outsourcing to low-wage countries, not by illegal immigrants taking jobs from Americans.

There is a thread, however, that runs through these disparate political developments. Decades of converging politics have stripped the major political parties in Europe and North America of their identity and legitimacy. While they may articulate political platforms that differentiate them sharply from one another, once in government there’s often little difference in how they govern.

Moreover, the embrace of the centre-left parties of pro-growth, new-economy agendas has often come at the expense of defending the interests of the working class. That group finds itself increasingly marginalized and anxious about its future in a high-tech, globally-integrated economy where they are vulnerable to job losses from technological innovation and job migration to low-wage countries.

The economic benefits of globalization and high-tech automation may be compelling, but its logic is lost on those who are globalized and automated out of a job. The choice is not between protectionism or policies that restrict innovation, but neither is it between expanding the dole or ignoring a segment of society that increasingly feels left behind.

New Democrats and New Labour may have been successful political strategies in the short-term, but they succeeded by undermining in the long run the legitimacy of the historic right-left dynamic of western politics.

The traditional blue-collar working class is going to be a fixture of politics for at least another generation. If the mainstream parties ignore their concerns, either the fringe parties or fringe elements within mainstream parties will increasingly articulate those concerns.

While the parallels can be overdrawn, Brexit, Jeremy Corbyn, Donald Trump, Bernie Sanders, Marine Le Pen and the AfD, while seemingly having nothing in common as a group, are national manifestations of the same widespread and deep-seated anxiety. In many cases, like Trump and Sanders, they are flip sides of the same coin.

It’s an anxiety that’s deeply felt in the old industrial cities and heartlands of Europe and North America. It’s an anxiety that the financial and technological elite, and the political class that depends on their support, is oblivious to.

The AfD’s slick, well-orchestrated campaign that Germans want “bikinis and not burkas” proved to be successful in propelling the party to a new prominence in German politics. They combined fear of the consequences of unrestricted immigration with blue-collar anxieties about their economic future.

It’s a formula that has worked elsewhere and will increasingly be the norm in western politics.