IT WAS too close for comfort. The choice of Austria’s new president came down to postal votes. Alexander van der Bellen, a former Green Party leader, took 50.3% of the votes, against 49.7% for Norbert Hofer of the far-right Freedom Party (FPÖ). Mr van der Bellen’s victory only became clear on May 23rd, almost 24 hours after polls closed. Among those who cast their ballots on election day, Mr Hofer enjoyed a narrow win. But once absentee ballots were counted, Mr van der Bellen came out ahead. Even before the final results were announced, both the FPÖ’s leadership and its rank-and-file were suggesting it had been fixed.

That Mr Hofer came so close to winning the presidency was a product of both local and continental circumstances. On the one hand, anti-immigrant parties are rising all across Europe. On the other, Austria is a country where the far right has long been strong, one that has never fully come to terms with its complicity in the Third Reich. The FPÖ epitomises that. Founded by former SS members in the years after the war, for decades it pushed for closer links between the German-speaking peoples. Several of the Burschenschaften, secretive pan-Germanist fraternities with roots in late-19th-century duelling culture, have close links to the party.

The presidential election testified to the collapse of Austria’s traditional political centre. Austria’s mainstream parties, the centre-left Social Democrats and the centre-right People’s Party, have traded power or governed together since 1945. They have employed a cronyistic system of parcelling out government jobs, and have been joined in grand coalitions since 2007, leaving the country without a mainstream opposition. So last year, when popular anger grew over the migrant crisis that sent about a million asylum-seekers through Austria, it was aimed at the entire political establishment, strengthening parties on the fringes. In the first round of the presidential election, the governing parties’ candidates combined drew just 22% of the vote.

And yet, in this election at least, the ultimate beneficiary of the centre’s collapse was not the xenophobic right but the environmentalist left. Mr van der Bellen is a well-known figure who led the Green Party in the 1990s and early 2000s. His personal appeal is generally seen as higher than that of his party, which has never drawn much more than 10% in national elections. Much of his support clearly reflected a rallying effort by centrist voters who decided that given a choice between extremes, they would rather see a crotchety but familiar left-winger in the presidency than a bombastic, unpredictable nationalist. But there is also clearly a hunger across the political spectrum for candidates who stand for clear ideals.

In this sense Austria reflects the state of politics across Europe, and perhaps across the West as a whole. In France, Marine Le Pen, who endorsed Mr Hofer, will almost certainly make the presidential run-off next year. In Germany, the anti-EU Alternative for Germany party is making strides forward at regional elections. In Poland and Hungary, right-wing populist governments are already pushing some of the authoritarian policies that Heinz-Christian Strache (Mr Hofer’s more divisive party leader and, some would say, puppet master) is advancing in Austria.

Whatever path mainstream parties choose to counter the rise of the extremes, it should probably not be the Austrian one. The grand coalition government pandered to the FPÖ rather than ostracising it, moving in its direction on refugee policy. This only made the centrists seem less distinct from the FPÖ, and less forthright. Centre-right and centre-left parties in many European countries have taken similar approaches, striking half-hearted anti-immigrant and anti-EU postures to defend their flanks. The message of the Austrian election is that European publics are instead hungry for politicians with clear ideals—and that it is a very close call as to whether they prefer right-wing or left-wing ones.