A left-leaning, Green Party-backed candidate has won Austria's presidential election, edging out an anti-immigrant populist by just 0.6 percent of the vote.

Alexander Van der Bellen, a retired economics professor, had 50.3 percent of the vote, according to The Associated Press. His rival, Norbert Hofer of the far-right Freedom Party, had 49.7 percent.

A mere 31,000 votes — out of more than 4.6 million — separated the two candidates.

Joanna Kakissis, reporting for NPR from Vienna, described der Bellen as a 72-year-old, chain-smoking economist.

The man he defeated, 45-year-old Hofer, is a polarizing figure, as Joanna explains:

"Hofer, who trained as an airplane mechanic, talked tough on migrants — especially Muslims. His party's anti-migrant message struck a chord with Austrians."Many are concerned that this small country of fewer than 9 million cannot support the 90,000 asylum-seekers who arrived last year."Had Hofer won, he would have been the first elected head of state from a far-right party in the European Union."

Even though Hofer lost, the narrow margin was, for many, a sign of the popularity of far-right movements in Europe.

Hofer looked ahead in a Facebook post thanking his supporters.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.