Austria has elected Green Party politician Alexander Van der Bellen as president, following a tightly-fought contest that was seen as a barometer of anti-European feeling across the EU.
Mr Van der Bellen narrowly defeated Norbert Hofer, the 45-year-old candidate of the far-right Freedom Party, despite Mr Nofer winning a decisive victory in the first round of presidential elections last month.
The results of the closely-watched election will be greeted with relief by mainstream political parties across Europe, who had feared that the election of a far-right head of state could be indicative of a wider resurgence in populist right-wing politics in the wake of the refugee crisis.
French prime minister Manuel Valls tweeted: "It's a relief to see the Austrians reject populism and extremism. Everyone in Europe must draw lessons from this."
Mr Nofer topped the first-round presidential poll on April 24th with 35 per cent of the vote, a result that led to the resignation of chancellor Werner Faymann after his centre-right party finished in fifth place with just 11 per cent.
But Mr Nofer failed to capitalise on the victory in the second-round vote on Sunday.
Instead, Mr Van der Bellen (72), who ran as an independent supported by the Green Party, which he once led, scooped up mainstream support, topping the poll in Austria's ten largest cities, particularly in Vienna, with Mr Hofer performing better in rural areas.
The contest was tightly-run, with Mr Hofer leading Mr Van der Bellen by 51.9 per cent to 48.1 per cent after votes were counted on Sunday. But approximately 740,000 postal votes, which were counted on Monday, pushed Mr Van der Bellen into first position.
According to the final result, Mr Van der Bellen took 50.3 per cent of the vote, with Mr Hofer on 49.7 per cent.
Conceding defeat in a Facebook post on Monday, Mr Hofer said he was "naturally sad" at the outcome, adding: "I would have been happy to have cared for our wonderful country as federal president." But he also urged voters not to be "disheartened".
“The effort in this election campaign is not wasted, but is an investment for the future,” he said.
While Mr Hofer's narrow defeat will be welcomed by Brussels, the strong performance of the Freedom Party will rattle nerves ahead of next year's elections in France and Germany.
The Freedom Party, which was formed by a former Nazi officer in the 1950s, rose to prominence in the 1990s under the leadership of Jörg Haider. But it secured its biggest ever share of the popular vote in the first-round presidential vote in April.
Mr Hofer ran under a strongly nationalist agenda, tapping into public concerns about the refugee crisis which has seen thousands of migrants enter Austria. While most of those entering Austria continued their journeys into Germany, about 90,000 migrants have claimed asylum in Austria, spawning widespread concern in the country about the EU’s refugee policy.
While the former chancellor Mr Faymann was traditionally a strong ally of his German counterpart Angela Merkel, Vienna shifted its position on the refugee crisis towards the end of last year, criticising the "open doors" policy espoused by Berlin.
Christian Kern, the leader of the Social Democrats, was last week appointed Mr Faymann's successor. Though he committed to continuing the ruling coalition partnership with Mr Faymann's People's Party, he did not rule out future partnership with the Freedom Party.
Welcoming the presidential election result, the co-chair of the Greens in the European Parliament, Philippe Lamberts, said the result "renews hope in Europe". But he added: "the rise of populism and nationalism across Europe should worry every democrat across our continent".