By Francois Murphy and Michael Shields
VIENNA (Reuters) - Austria came close to becoming the first European Union country to elect a far-right head of state as postal ballots on Monday decided a knife-edge presidential vote in favour of the anti-immigration candidate's environmentalist opponent.
The results were awaited nervously by governments across Europe, where populist anti-immigration parties have surged over the past year on concerns over a refugee influx, continued weak economic growth and high unemployment.
After the election was too close to call on Sunday, a count of absentee votes on Monday thrust 72-year-old Alexander van der Bellen past anti-immigration Freedom Party rival Norbert Hofer and into the largely ceremonial post of president.
The Freedom Party and its European allies expressed disappointment at the defeat but delight at the record support from Austrian voters, while traditional parties of government breathed a sigh of relief.
"Fifty percent confidence in Norbert Hofer is a gigantic showing," his campaign manager Herbert Kickl told public broadcaster ORF, toning down comments before the election that suggested the Freedom Party (FPO) might contest the count.
"One thing is clear: there are many Norbert Hofers in the Freedom Party and we are very, very well placed for parliamentary elections - whenever they come," he added.
The Interior Ministry count gave van der Bellen, a former Greens party leader, 50.3 percent of the vote, compared to 49.7 percent for Hofer. The margin of victory was just over 31,000 out of nearly 4.5 million valid votes cast.
One factor behind the strong FPO showing was dissatisfaction with the two centrist parties that have dominated politics in Austria, often by governing in coalition, as they do now, and carving up top institutions between them over the decades.
Opinion polls in the Alpine republic of 8.5 million people regularly suggest the FPO would win parliamentary elections if held now. The current government's term runs until 2018.
"This is just the beginning," FPO boss Heinz-Christian Strache said on his Facebook (NASDAQ:FB) page.
Van der Bellen said he planned to unite Austria after its almost dead-even split in the vote.
"We are the same," he said in his first speech as president-elect. "There are two halves that make up Austria. The one half is just as important as the other."
Please click on http://tmsnrt.rs/1YSxvkK for our graphic on right-wing party support in Europe.
EMBARRASSMENT
Hofer conceded defeat in a post on his Facebook page, thanking his supporters and telling them not to be despondent.
The outcome averted a major potential embarrassment for Europe's political establishment though exposed how vulnerable it has become to a popular backlash against immigration.
"It's a relief to see the Austrians reject populism and extremism," French Prime Minister Manuel Valls said in a Twitter post. "Everyone in Europe must draw lessons from this."
Prosperous Austria has been swept up in Europe's migrant influx, fanning concerns about rising unemployment and the erosion of the country's high living standards.
Pollster SORA had said mail-in ballots were likely to favour van der Bellen because they are traditionally used by more educated voters, 81 percent of whom backed van der Bellen on Sunday, according to SORA polling.
The vote in Austria had unsettled leaders elsewhere in Europe, particularly in neighbouring Germany, where the new anti-immigration Alternative for Germany is on the rise.
TWO HALVES
In France, the National Front of Marine Le Pen is leading in polls ahead of a presidential election next year. Across the Channel, the UK Independence Party is campaigning for Britain to leave the 28-nation EU in a referendum on June 23.
"Despite the disappointment, a historic score for our ally from the FPO," National Front Secretary General Nicolas Bay said on Twitter. "The future belongs to patriots!"
Greece's leftist Syriza party said Hofer's strong showing "means it is time that alarm bells start ringing for Europe".
Hofer, 45, has described himself as a centre-right politician and told voters not to believe suggestions from opponents that he would be a dangerous president.
His party, however, traces its roots to the Nazi past that Austria has not confronted as openly as Germany. The FPO was founded by a decorated member of the Nazi SS who served as agriculture minister after Hitler annexed Austria in 1938.
More recently, it has focused much of its critical campaigning on Muslim immigrants and its leaders have courted Jewish voters with moves like a recent visit by Strache to the Yad Vashem Holocaust memorial in Jerusalem.
"Unfortunately, the dissatisfaction with the moderate mainstream parties is providing oxygen to those like Hofer and the Freedom Party, and we are seeing signs of these trends across Europe," European Jewish Congress President Moshe Kantor said of the Austrian election result.