The interior minister said that Alexander Van der Bellen won 50.3 per cent of the vote in Sunday's election, compared to 49.7 per cent for Hofer, presented as the friendly and moderate face of the anti-immigration, populist Freedom Party (FPOe).
"Of course I am sad," Hofer said on Facebook as he conceded defeat. "I would have loved to have looked after this wonderful country for you as president."
Preliminary results late Sunday had put Hofer 3.8 percentage points ahead in the runoff for the largely ceremonial but bitterly fought-over post of Austrian head of state.
But this paper-thin margin was erased after a record 700,000 postal ballots were counted during today, dramatically putting Van der Bellen ahead by just over 31,000 votes in the final tally.
More From This Section
Most observers had thought that the professorial and somewhat dishevelled Van der Bellen, 72, would fail to beat his polished younger rival after lagging 14 points behind him in the first round on April 24.
"But in the last 14 days, there has been such a momentum among voters -- musicians, actors, workers, totally different people across all generations, professions and all sections of society."
Gun enthusiast Hofer, 45, had tapped into unease about the record number of asylum-seekers at the height of Europe's migrant crisis, with his typical supporters made up of poorly educated working-class men.
Around seven out of 10 working-class voters plumped for Hofer.
But this self-proclaimed "gladiator" has also toned down the FPOe's message to appeal to voters disillusioned with the centrist parties in the current government that have dominated national politics since 1945.