The far right, racist Alternative for Germany (AfD) came second in elections in the state of Mecklenburg-Vorpommern on 4 September. With 22 percent of the vote, it outpolled the Christian Democrats of conservative federal chancellor Angela Merkel, behind only the Social Democrats on 29 percent.

The AfD wants to halt Muslim immigration, ban mosques and the wearing of headscarves, ban abortions and reintroduce military conscription as a basis for a more aggressive foreign policy.

Party leader Frauke Petry has called for the transformation of the Federal Office for Migration and Refugees into an Authority for the Return of Immigrants. She has advocated a milder version of Liberal and Labor policy in Australia, demanding that refugees whose claims for asylum have been rejected and illegal immigrants should be expelled to islands. A member of the European Parliament and the head of the AfD’s largest state branch, Marcus Pretzell, said, “The defence of the German border with armed force” should be used to stop refugees.

After a ballot in Berlin on 18 September, the AfD will enter 10 of the 16 German state parliaments and looks set to have major federal representation after next year’s election.

Germany has the strongest economy in Europe, but GDP growth has been less than 2 percent a year since 2011. The Social Democratic-Green coalition government of Gerhard Schröder in the mid-2000s began a process of cutting welfare and deregulating the labour market. While real wages have been growing since the global financial crisis, job insecurity has also increased.

The current federal coalition government of the two largest parties, the Christian Democrats and Social Democrats, has not been met with credible opposition, opening the way for the AfD.

The Greens are neoliberals who care about nature and eat tofu.

The Left Party is critical of government policy from a more working class perspective. But its leadership is preoccupied with maintaining the respectability that is a precondition for participating in current and future Social Democrat-Green-Left or Social Democrat-Left state and federal governments. At best, its stance is that of traditional, reformist social democracy focused on parliament rather than mobilisations on the streets and in workplaces, even around its Keynesian demands.

Despite the Left Party’s generally good position on refugees, joint federal parliamentary leader Sahra Wagenknecht has repeatedly made statements that contribute to paranoia.

In addition to economic experiences, there are other conditions which may lead significant numbers of people to embrace racist and fascist explanations of events and policies. Particularly important are the extent to which racism is acceptable in public discussions, the number of committed fascists and their levels of experience, discipline and organisation.

For decades, governments led by conservatives or social democrats have made racism respectable, notably through policies against refugees and Muslim teachers wearing head scarves. For many, racism has become a common sense channel for general dissatisfaction with their incomes and welfare. Racist ideas provide a simple explanation of what’s wrong and who’s to blame: Muslims, Arabs, Turks, Africans and even eastern Europeans, as well as the mainstream parties which supposedly favour them at the expense of “real Germans”.

There is organisational continuity between Hitler’s Nazi Party and contemporary fascist groups. It is more fragmented than is the case with the Freedom Party in Austria, but fascist groups have produced generations of committed activists. The AfD has been careful to avoid public hostility and the attention of police agencies. It doesn’t identify with the Nazi regime or anti-Semitism, or too explicitly criticise democracy. But many experienced fascists have joined the party and regard it as an opportunity to recruit to their views.

Dubravko Mandic, who is a member of the party’s internal court in the state of Baden-Württemberg and on the executive of one of the AfD’s hard right factions, confided on a closed Facebook group: “We differ from the [neo-Nazi] NPD principally in our middle class support, not so much in content”.

A key figure in the party is Alexander Gauland, who came from the far right wing of the Christian Democrats and has been associated with “new right”, i.e. fascist, publications.

The AfD was set up in 2013 around hostility to German participation in the eurozone, by neoliberal economists, journalists and others like Gauland from the Christian Democrats or the small, neoliberal and increasingly irrelevant Free Democrats. But the party’s leaders were all either racists or prepared to use racism, recognising that neoliberal policies were no vote winner. Their public statements were increasingly about the threat from refugees and Muslims.

In 2014 and 2015, the Patriotic Europeans Against the Islamisation of the West movement, in which experienced fascists played an important role, mobilised thousands of people on the streets of German cities around racist demands. This further demonstrated the extent of a large potential constituency for the AfD.

In July 2015, the founding leader of the party, economist Bernd Lucke, lost his post to the more determined racist Frauke Petry. He and other members mainly concerned with economic policy, including most of its members in the European Parliament, soon resigned from the party.

The AfD is now much like the fascist National Front in France and the Freedom Party, with its fascist core, in Austria. All three belong to the same grouping in the European Parliament.