VIENNA -- A pro-European Union candidate eked out a victory Monday over a right-wing, anti-migrant rival to become Austria's next president, in a tight contest viewed Europe-wide as a proxy fight pitting the continent's political center against its growingly strong populist and anti-establishment movements.

European mainstream parties joined Austrian supporters of Alexander Van der Bellen in congratulating him on his victory over Norbert Hofer, with German Foreign Minister Frank-Walter Steinmeier declaring. "All of Europe is now breathing more easily."

But with less than a percentage point separating the two, Hofer's Freedom Party and its allies across Europe also had reason to celebrate what they cast as a major political surge by one of their own.

Get Breaking News Delivered to Your Inbox

Hofer had been narrowly ahead of Van der Bellen, a Greens politician running as an independent, after the counting of votes directly cast on Sunday. But around 700,000 absentee ballots still remained to be tallied Monday, and those numbers swung the victory to Van der Bellen.

Presidential candidate Norbert Hofer of the Austrian Freedom Party (FPOe) waves to supporters after Austrian presidential election in Vienna, Austria, May 22, 2016. REUTERS

Interior Minister Wolfgang Sobotka said Van der Bellen collected 50.3 percent of the votes compared with 49.7 percent for Hofer of the Freedom Party. Only a little more than 31,000 votes separated the two, out of more than 4.6 million ballots cast.

The results diminish the scenario that Austria's political landscape could immediately move away from its centrist political image through a new president who could oppose the government's EU-friendly policies and increase pressure for tighter migrant controls.

Still, the narrow margin for Van der Bellen is the latest indication that Europe's anti-establishment parties are gaining influence.

Hofer announced his defeat shortly before the official announcement in a Facebook post thanking his backers for their support.

He acknowledged he is "naturally sad," adding: "I would have been happy to have cared for our wonderful country as federal president." His post said that the work of his supporters during the election is "not lost but an investment in the future."

With the results close, Herbert Kickl, secretary general of Hofer's party, said it might demand a recount "in case of significant signs of abuses" during the absentee vote count. A Freedom Party meeting was called for Tuesday.

Hofer's Freedom Party has exploited anti-EU sentiment and fear that Austria could be overrun by refugees to become the country's most popular political force. Van der Bellen was generally supported by pro-European Union Austrians favoring humane immigration policies and others opposed to the right.

Despite pledges by both candidates to be the president of all Austrians, the split vote revealed unprecedented polarization over which direction the nation should now take, particularly over migration and the EU's future. Van der Bellen sought to smooth over the differences in post-result comments.

"We're equals," the 72-year old economist told reporters. It's two halves that define Austria ... and together we make this beautiful Austria."

But one thing united Hofer and Van der Bellen despite their ideological differences. Both were protest candidates, mirroring the depth of Austrian dissatisfaction with the status quo. Contenders for the Social Democrats and the centrist People's Party -- the two parties that form the government coalition -- were eliminated in last month's first round of voting.

Those parties have dominated Austrian politics since the end of World War II and winners of all previous presidential elections since then have been backed by one of the two.

Hofer's strong showing reflects the growth of support for anti-establishment parties across the continent to the detriment of the political middle. Slovak Foreign Minister Miroslav Lajcak, a Social Democrat, described it as "a continuation of a trend."

"People are dissatisfied with the traditional, standard political parties," he said on arrival at an EU foreign ministers' meeting in Brussels. "I really believe it's time for us to reflect upon it because we must be doing something wrong."

In a tweet reflecting a collective sigh of European establishment relief, Czech Defense Minister Martin Stropnicky of the centrist ANO party hailed Van der Bellen's "narrow but for Europe important victory." German President Joachim Gauck described Van der Bellen as a "convinced European" who wants to work for a "strong, steady, and in the long run stronger European Union."

Presidential candidates Norbert Hofer of the Freedom Party (FPOe) and Alexander Van der Bellen (L) who is supported by the Greens party, shake hands before a TV debate after the Austrian presidential election in Vienna, Austria, May 22, 2016. REUTERS

Europe's right, meanwhile, praised Hofer's close finish as a milestone on the path of international dominance for the right. France's National Front offered "warmest congratulations," adding "This historic performance certainly ensures future success for all patriotic movements, in Austria and elsewhere in the world."

Comments from Austria's foreign minister before the final tally was announced showed the government bracing for the worst in terms of international reaction had Hofer won.

President Kurt Waldheim, who was backed by the centrist People's Party, already was boycotted by most of the world decades ago after revelations that he served in a German unit linked to atrocities in World War II. In Brussels, Foreign Minister Sebastian Kurz appealed "to everyone to respect the results, totally independently from ... whether they are happy with it or not, because this was a democratic Austrian election."

Hofer as president may have been unwelcome in some European capitals as governments there try to keep their populist Euroskeptic parties in check. And the Freedom Party's anti-Muslim campaigning also could have led to Mideast governments avoiding him.