Austrian Presidential candidate Alexander Van der Bellen celebrates with supporters in Vienna. Photo: Alex Halada / AFP

Austrian voters have roundly rejected a candidate vying to become the first freely elected far-right head of state in Europe since World War II, halting at least temporarily the wave of populism sweeping Western democracies.

The runoff vote was a litmus test, as it was a rerun of a vote held in May, before Britain voted to leave the European Union and Americans elected Donald Trump as president.

Norbert Hofer of the anti-immigration Freedom Party lost the May election by less than a percentage point, and polls had for months shown the race too close to call.

However, within minutes of polls closing it was clear he had lost to the former Greens leader Alexander Van der Bellen, who had put the June Brexit referendum at the center of his campaign, saying Hofer would lead Austria down the same road as Britain and warning voters not to “play with this fire”.

“A red, white and red signal of hope and of positive change is being beamed from Vienna through Europe,” Van der Bellen said in a victory speech, referring to the colors on Austria’s flag. “I will be a pro-European president of Austria open to the world.”

With only postal ballots left to count, a projection by pollster SORA for broadcaster ORF showed Van der Bellen on 53.3 percent and Hofer on 46.7 percent, with a margin of error of 0.4 percentage points.

Turnout was roughly a percentage point higher than in May, at 74 percent. That election had to be rerun because of irregularities in counting the votes.

The result dealt a blow to populists, who had hoped anti-establishment anger had grown enough since the Brexit referendum and Trump’s triumph to sweep Hofer into office. The closely watched vote also came before elections in France, Germany and the Netherlands next year.

Data from SORA showed that Van der Bellen’s pro-European stance was his supporters’ second-strongest reason for voting for him, cited by 65 percent of them, just behind the view that he would best represent Austria abroad.

Among Hofer supporters, the top reason was that he “understands the concerns of people like me”, cited by 55 percent of respondents.