Indeed, Austria’s close shave could also serve as a lesson for US Democrats and moderate Republicans worried about the much-reviled Republican candidate Donald Trump’s onward march, as well as voters in the UK who want to stay in the European Union come the June 23 referendum.

A victory for Hofer—who has worn a cornflower buttonhole reminiscent of the Nazis at official functions as recently 2013—would have been a red letter day for Europe’s anti-Islam, anti-immigration parties, including Germany’s Alternative for Germany, France’s Front National, and Britain’s UKIP.

And while his defeat follows the pattern of far-right parties elsewhere in Europe, it is remarkable just how deeply the 45-year-old has shaken Austria’s established political scene, where the center-left Social Democrats and conservative People’s party have dominated since the end of the Second World War. The Freedom Party’s surge in popularity forced the resignation of chancellor Werner Faymann earlier this month, after he lost the confidence of his Social Democrats.

Unsurprisingly, Hofer found most of his support in the rural border states most affected by the refugee influx, while Van der Bellen commanded the urban and the female electorate.

While the role of president is largely ceremonial in Austria, Hofer had said he would make use of a right to dissolve parliament before the 2018 general elections of it did not act against immigration.

His recent debate on Austrian TV with Van der Bellen descended into a foul-mouthed “slugfest,” with the commentator summing it up thusly: “Both disgraced themselves, the office of the president is damaged, that was kindergarten level.”

📬 Sign up for the Daily Brief

Our free, fast, and fun briefing on the global economy, delivered every weekday morning.