The far-right candidate conceded defeat in a Facebook post after an extraordinarily close count
Alexander Van der Bellen has narrowly beaten his far-right rival Norbert Hofer to become Austria's new head of state.
Despite two different exit polls giving Mr Hofer of the right-wing Freedom Party the lead, Austria's interior minister announced independent candidate Mr Van der Bellen will become the country's next president.
Interior Minister Wolfgang Sobotka said Mr Van der Bellen collected 50.3 per cent of the votes, compared to 49.7 for Mr Hofer.
Mr Van der Bellen, 72, campaigned on a pro-EU platform and was backed by the Greens. Although officially independent, he led the Greens for a decade and has been hailed as the world's first Green head of state.
Nearly 700,000 absentee ballots were counted on Monday to determine the winner of the knife-edge election. Only a little more than 31,000 votes separated the two, out of more than 4.6 million votes cast.
Sunday's provisional result, which did not include postal ballots, showed Mr Hofer ahead with 51.1 per cent to Mr Van der Bellen's 48.1 per cent.
Mr Hofer conceded defeat in a post on Facebook.
He said he was "naturally sad", adding: "I would have been happy to have cared for our wonderful country as federal president."
He said the work his supporters put in during the election is "not lost but an investment in the future".
Dr Moshe Kantor, President of the European Council on Tolerance and Reconciliation and President of the European Jewish Congress, said: "While we are certainly satisfied with the result, there is little room to celebrate the high level of support for someone with such extremist views.
"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, so it is incumbent on the more Centrist parties to use this as a wake-up call and listen to the grievances of the people."
"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."
Austria's presidency is a largely ceremonial role, but has important powers such as the ability to dismiss the National Council, a move which would trigger a general election.