After Germany let in nearly 900,000 refugees in 2015, the AfD saw their polling figures jump from the single digits up into the mid-teens.
The German public was at first largely receptive to the people fleeing war in Syria, Afghanistan and other countries. But mass sexual assaults of women over New Year in Cologne and other cities, widely reported as being carried out by men of North African or Arab appearance, soured the public mood.
During state elections in March, the AfD caused a minor political earthquake, gaining the second highest number of votes in Saxony-Anhalt and scoring well in the wealthy southwestern states of Baden-Württemberg and Rhineland-Palatinate.
After two Isis-linked terror attacks in the summer, both carried out by asylum seekers, a public debate again raged about whether refugees had increased the dangers of everyday life in Germany.
In state elections in Berlin and Mecklenburg-Western Pomerania in September the AfD again stole the show, winning over large numbers of voters from the established parties.
But according to trade union head Jörg Hofmann, the focus on the refugee crisis ignores another factor in the rise of the far right party.
“Digitalization, globalization and demographic change are hitting a society which is marked by insecurity and inequality,” Hofmann told Tagesspiegel.
“These are the consequences of Agenda 2010,” added the head of IG Metall, which with 2.3 million members is Germany’s largest trade union.
Agenda 2010 was a programme of reforms brought in by Germany’s last Social Democrat (SPD) Chancellor Gerhard Schröder in 2003.
The reforms cut unemployment benefits and made it easier for companies to fire employees.
While they are credited with bringing down Germany’s unemployment rate to historic lows, critics say they have led to an increase in poverty rates in the country.
Hofmann argued that people were were no longer seeing a better future for their children and this was leading them to fall for the “simple slogans” of the AfD.
“It isn’t enough to shake your fists at those in power, and it certainly won’t do to kick out at those weaker than you – we need collective action,” he said.
A recent study by the Bertelsmann Stiftung also supports the argument that fears of globalization are driving people towards the AfD.
“The results of our study show that above all, fears about globalization are what drive some people to turn away from mainstream politics and vote for a populist party. Values only play a secondary role,” the report concluded.