Far-right candidate Norbert Hofer had been hoping to ride the wave of populism and anti-establishment sentiment sweeping the West to victory in Austria’s presidential election.

But by Sunday afternoon, the polls had closed and the anti-Islam and anti-immigration Freedom Party was forced to concede defeat to Alexander Van der Bellen, a left-leaning independent, now president-elect, who advocated tolerance and moderation. Van der Bellen won with 53.5 percent of the vote compared to Hofer’s 46.4 percent — a larger margin of victory than was predicted by pre-vote polls, Reuters reported.

“I am infinitely sad that it didn’t work out,” Hofer wrote on his Facebook page.

If he had won, Hofer would have been the first far-right candidate to win in a free election in Europe since World War II.

Van der Bellen warned on the campaign trail that the Euro-skeptic Hofer would likely try to follow Britain’s lead by seeking an exit from the European Union.

All eyes were on Austria this election, which was a do-over from May when Van der Bellen won by less than one percentage point. Hofer’s freedom party claimed voting irregularities. But that was before Brexit, and before Donald Trump won the United States election — both seen as victories for populism.

Lawmakers in France and the Netherlands are battling similar currents in upcoming elections. Both far-right National Front leader Marine Le Pen of France and anti-immigrant politician Geert Wilders in the Netherlands tweeted their support for Hofer.