"Europe has been polarized for years by misguided policies pursued by the old major parties, not only in Germany but in many European countries. The fact is that it must be our task to preserve freedom, democracy and the rule of law across the continent. And the policy of open borders does exactly the opposite." — Frauke Petry, Alternative for Germany party.

Meanwhile, European elites have expressed relief at Norbert Hofer's defeat. Their reactions would indicate that they unaware that they are largely responsible for the rise of anti-establishment parties in Austria and other parts of Europe.

European political and media elites have been quick to hail the election of Van der Bellen, who campaigned on a pro-immigration, pro-EU platform. They seem to believe his razor-thin win validates their uninterrupted pursuit of European multiculturalism.

Norbert Hofer of the anti-immigration Austrian Freedom Party (FPÖ) has been narrowly defeated in his bid to become Austria's next president.

Alexander Van der Bellen, former leader of Austrian Greens party, won 50.3% of the vote, compared to 49.7% for Hofer. The margin of victory was 31,026 out of nearly 4.5 million votes cast.

European political and media elites have been quick to hail the election of Van der Bellen, who campaigned on a pro-immigration, pro-EU platform. They seem to believe his razor-thin win validates their uninterrupted pursuit of European multiculturalism.

But Hofer can claim victory even in defeat. By winning half the ballots cast, Hofer has exposed Austria's gaping political divide on immigration and relations with the European Union. Hofer's rise, which has effectively upended Austria's political system, has also inspired anti-establishment parties in other parts of Europe.

Hofer had been in the lead after polls closed on May 22, with 51.9% of the vote to Van der Bellen's 48.1%. In the end, however, the race was decided by 700,000 mail-in votes, accounting for 14% of eligible voters. Van der Bellen won 2,254,484 votes to Hofer's 2,223,458, according to the Interior Ministry.

In what amounted to a political earthquake, Hofer won 36% of the vote in the first round of voting on April 24. Hofer — who campaigned on a platform calling for strict limits on immigration and tough rules for asylum seekers — defeated all of the other candidates, including those from the two governing parties, the Social Democrats and the Austrian People's Party, which have dominated Austrian politics since the end of World War II.

Although the role of president in Austria has traditionally been largely ceremonial, Hofer had suggested that he would try to remove the current government led by newly appointed Chancellor Christian Kern and force new parliamentary elections. Opinion polls suggest that if parliamentary elections were held today, the Freedom Party would win. The next polls are scheduled for some time in 2018.

Van der Bellen, a 72-year-old economist, was gracious in victory, pledging to be "non-partisan president for all of those living in Austria." He added: "All Austrians are equal. Austria consists of two halves. The one half is just as important as the other half."

An analysis in the German newspaper Die Welt warned that Van der Bellen will not have it easy:

"It will be up to Van der Bellen to find the right tone and to show that he not only embodies the Austria of the city dwellers, but the whole country. He will have to bear in mind that according to the polls, 40% of those who voted for him did so only because they wanted to prevent a president from the Freedom Party."

Conceding the election, Hofer wrote on Facebook: "Of course, it is a sad day. But please do not be discouraged. The effort in this election campaign is not wasted. It is an investment for the future."

Hofer's meteoric rise has focused the minds of the establishment parties. On April 27, just three days after Hofer's initial electoral victory, the Austrian Parliament adopted what may be one of the toughest asylum laws in Europe.

Under the new law, Austria will declare a "state of emergency" on the migration crisis. This will allow Austrian authorities to assess asylum claims directly at the border. Only asylum seekers with immediate family members already in Austria, or those who can prove they are in danger in neighboring transit countries, will be allowed to enter the country. Other migrants will be turned away. The new law also limits any successful asylum claim to three years.

Austria received 90,000 asylum requests in 2015, the second-highest number in the European Union on a per capita basis, but this pales in comparison to what may lie ahead. In a radio interview on April 28, Interior Minister Wolfgang Sobotka warned that up to one million migrants are poised to cross the Mediterranean Sea from Libya to Europe.

Mass migration to Austria has been accompanied by a spike in migrant-related rapes, sexual assaults and other crimes across the country, and has contributed to the rise of the Freedom Party.

Reflecting on the outcome of the presidential election, Hofer's campaign manager, Herbert Kickl, said: "This is a huge achievement. Hofer managed to convince half of the population in defiance of the system."

In France, where polls show that the leader of the National Front, Marine Le Pen, is leading polls for presidential elections in 2017, party secretary general Nicolas Bay wrote on Twitter: "Despite the disappointment, a historic score for our ally from the Freedom Party. The future belongs to patriots!"

Meanwhile, European elites have expressed relief at Hofer's defeat. Their reactions would indicate that they unaware that they are largely responsible for the rise of anti-establishment parties in Austria and other parts of Europe.

The president of the European Commission, Jean-Claude Juncker, said anti-EU parties should be completely shunned: "Neither a debate nor a dialogue is possible with right-wing populists."

German Foreign Minister Frank-Walter Steinmeier said: "The election result removes a heavy burden for all of Europe." Ralf Stegner, the deputy director of Germany's Social Democrats (SPD) commented on Twitter: "This must serve as a warning that we can never again allow it [the rise of anti-establishment parties] go this far and that we have to combat this threat to our democracy with full force!"

But the leader of the Alternative for Germany party, Frauke Petry, said the vote was "an important day, not only for Austria, but for all of Europe." She added:

"Europe has been polarized for years by misguided policies pursued by the old major parties, not only in Germany but in many European countries. The fact is that it must be our task to preserve freedom, democracy and the rule of law across the continent. And the policy of open borders does exactly the opposite."

The outcome of the Austrian presidential election will not be official until June 1, the deadline for legal challenges to the vote count. Some Freedom Party members have expressed anger at the opaque manner in which mail-in ballots are counted.