Vienna (AFP) - Austria's government was licking its wounds Monday after a historic debacle that saw the opposition anti-immigrant far-right triumph in a presidential ballot two years before the next scheduled general election.

According to preliminary results, Norbert Hofer of the Freedom Party (FPOe) came a clear first with 36 percent of the vote, while candidates from the two governing parties failed to even make it into a runoff on May 22.

The result means that for the first time since 1945, Austria will not have a president backed by either Chancellor Werner Faymann's Social Democrats (SPOe) or their centre-right coalition partners the People's Party (OeVP).

"This is the beginning of a new political era," FPOe leader Heinz-Christian Strache said after what constituted the best-ever result at federal level for the former party of the late Joerg Haider, calling it a "historic result".

The centre-right OeVP's candidate Andreas Khol came equal fourth with 11 percent, level with the SPOe's Rudolf Hundstorfer.

Faymann said the result was a "clear warning to the government that we have to work together more strongly". He said however that his party would not make any personnel changes -- including with regard to his own position.

Facing Hofer on May 22 is likely to be Alexander van der Bellen, backed by the Greens, who garnered 20 percent, ahead of third-place independent candidate Irmgard Griss, who won 18.5 percent.

Having a president in the Habsburg dynasty's former palace in Vienna not from either of the two main parties could shake up the traditionally staid and consensus-driven world of Austrian politics.

The head of state's powers are largely ceremonial, but not only. Hofer has threatened to fire the government, while van der Bellen has said he will refuse to appoint Strache chancellor if the FPOe wins elections scheduled for 2018.

- European fringe parties -

The rise of fringe parties has been mirrored across Europe, including in Spain, Britain and Germany, and also in the United States with the populist messages of Donald Trump and Bernie Sanders.

Story continues

Marine Le Pen, leader of France's National Front hoping to become president next year, tweeted Sunday her congratulations to the FPOe for its "magnificent result. Bravo to the Austrian people".

Last year Austria received 90,000 asylum requests, the second highest in Europe on a per capita basis, and Faymann's government has taken a firmer line on immigration in recent weeks.

This has included pressuring countries on the so-called Balkans refugee route from Greece northwards to Austria and Germany and erecting barriers at its borders in case of a renewed influx.

But this has not stopped support for the FPOe surging. Recent opinion polls put the party in first place with more than 30 percent of voter intentions.

- Sliding support -

Support for the two main parties, which have between them run Austria since 1945, has been sliding for years and in the last general election in 2013 they only just garnered enough support to re-form their "grand coalition".

Austria's traditionally strong economy has also faltered of late and it no longer has the lowest unemployment rate in the European Union. Faymann's coalition, in power since 2008, has struggled to agree structural reforms.

David Pfarrhofer from the Market polling institute said Sunday's result showed that the traditional parties cannot continue "messing around" if they want to cling onto power.

"It's not so much about personalities but about issues... Something needs to change if the SPOe and the OeVP want to avoid another debacle like this," Pfarrhofer told AFP.

Reinhold Mitterlehner, head of the OeVP, appeared to agree, saying late Sunday after the "disappointing" result that it was time to "relaunch" the coalition.

"This means in particular the bickering but also the content of what we are doing. I think this is the last chance to really do this," Mitterlehner said.