Far-Right Candidate Loses Bid for Presidency in Austria Norbert Hofer ran on an anti-immigration "Austria First" platform.

 -- Austrians have elected a pro-European former Green Party leader, Alexander Van der Bellen, as their next president over a far-right candidate who had campaigned on an anti-immigration, "Austria First" platform.

Austria's presidency is a largely ceremonial post, but if Freedom Party candidate Norbert Hofer had won, he would have become Austria and Western Europe’s first far-right head of state since World War II.

Coming after Donald Trump's win in the United States and the Brexit vote in Britain, the vote was being watched across Europe as an indication of how well right-wing figures would do next year in elections in other European nations.

The result was greeted with relief and congratulations by mainstream politicians in Austria and neighboring Germany.

German Vice Chancellor Sigmar Gabriel, who heads that country's center-left Social Democrats, told the Bild newspaper that "a load has been taken off the mind of all of Europe." He called the result in Austria "a clear victory for good sense against right-wing populism."

Martin Schulz, the president of the European Parliament, called Van der Bellen's victory a defeat for "anti-European, backward-looking populism."

Hofer, a 45-year-old former engineer, conceded defeat on his Facebook page to Van der Bellen, a 72-year-old former economics professor.

Hofer thanked his supporters on Facebook and expressed sadness that his campaign was unsuccessful.

He also congratulated his rival and appealed for unity. “We are all Austrians,” he wrote, “no matter how we decide at the ballot box.”

Sunday’s vote was a runoff after balloting in May gave Van der Bellen a razor-thin majority of roughly 31,000 votes.

The Freedom Party contested the outcome in Austria’s constitutional court and won, with the court citing ballot-counting irregularities and ordering a new election.

The Associated Press contributed to this report.