Far-right populist Norbert Hofer, who had railed against migrants and Muslims while hoping for a tailwind from
Alexander Van der Bellen, a retired economist and former leader of the center-left Green Party, won 51.7% of the vote for the largely ceremonial office, according to preliminary results from the Austrian Interior Ministry.
Hofer, a dapper dresser and gifted orator from the populist Freedom Party who had positioned himself as the anti-establishment candidate, took 48.3%. The figures do not include absentee ballots, which will be counted Monday but are not expected to change the outcome.
Voter turnout was high, with some 74% of eligible voters casting ballots.
"The voter is always right in a democracy," Hofer told ORF TV after congratulating Van der Bellen. "I'd like to urge all those who supported me to accept that in a democracy, the decision of the voters is always the right one and that now that it's over, we'll all come together."
Van der Bellen gave credit to a broad-based movement that swept him, the former leader of a minor party, into office.
"We'll probably never know for sure what exactly happened," he said. "But it was thousands if not tens of thousands of people who went out there and talked to people, talked to their grandparents and people who might never have voted for me. It was a truly extraordinarily broad movement that emerged."
Van der Bellen said his main goal would be to reunite Austria after the polarizing campaign and that he hoped to be able to help fight growing unemployment as well as find solutions for people who are worried about their pensions and economic uncertainties.
"I hope that at some point people will see me as 'our president' and not 'the president' of any particular party," he said.
It was the second election pitting the two candidates. Van der Bellen, 72, had won the first vote on May 22 by just 31,000 votes, but a court ruled the election had to be repeated because of irregularities in the counting procedures of absentee ballots.
Most of Austria's political establishment, white-collar workers and others fearful of the reputation of a country heavily dependent on tourism rallied around Van der Bellen.
Hofer, 45, had been seen as the slight favorite in many opinion polls for the new vote. He enjoyed strong popularity, despite his extreme views, among blue-collar workers and the growing number of unemployed, raising fears in Austria and beyond that he could become the first far-right populist to lead a Western European country since World War II.
The right has seen a resurgence in Western Europe in the recent past, in part a reaction to the influx of migrants and refugees from Syria, Iraq, Afghanistan and Africa. At first, Austria warmly welcomed some 90,000 refugees, but closed its borders earlier this year amid protests.
Hofer, whose Freedom Party of Austria was founded by former Nazis in the 1950s, had said he expected Trump’s surprise victory in November as well as the
"In the end there was no evidence that Trump's election or Brexit had any impact on the election," Peter Filzmaier, a political science professor at the Donau University in Krems, Austria, said in an interview.
He noted that women overwhelmingly backed Van der Bellen and that Hofer was stronger among men. He added, however, that Hofer had appealed to the same sorts of voters who cast their ballots for Trump.
"Those who voted for Trump and Hofer were suffering from economic and social disappointment, in an angry and fearful mood," said Filzmaier. "National pride was also an important factor for the Hofer voters as it was for Trump. But the big difference between Trump and Hofer was that Trump campaigned against his party while Hofer was part of his party's establishment."
Sunday's election had attracted intense international attention because of Hofer's virulent opposition to immigrants, Muslims and transatlantic free trade agreements, which had touched a nerve in the country of 8.7 million and attracted many to his Trump-like calls to put Austria first.
Hofer wanted to see the EU powers reduced and had flirted with the idea of a referendum for Austrian voters to decide whether to stay in the EU.
"The whole of Europe has heaved a sigh of relief," German Foreign Minister Frank-Walter Steinmeier tweeted after Hofer's loss.
Van der Bellen is a relative outsider himself in a country where the two main center-right and center-left parties have dominated politics since World War II. His election to lead the country that stretches from Switzerland to Slovakia nevertheless heralded the end of an era for the ruling center-left Social Democrats and the center-right People's Party. Candidates from those two parties, which have ruled Austria together for 25 of the last 30 years, were knocked out in the first round of the election in April.
Kirschbaum is a special correspondent.
1:35 p.m.: This article has been updated with additional background.
11:10 a.m.: This article has been updated with quotes from candidates, analysts and Germany's foreign minister, and with updated figures for votes counted and turnout.