Alexei Korolyov

Special for USA TODAY

VIENNA — Austria’s highest court on Friday overturned the result of the May presidential election and called for a rerun, a legal victory for the far-right candidate who lost by a razor-thin margin.

“Elections are the foundation of our democracy. This decision makes no one a winner or loser, it serves to strengthen the trust,” Constitutional Court head Gerhart Holzinger said.

The results of the May 22 runoff election were contested by the far-right Freedom Party, whose candidate, Norbert Hofer, sought to become the first far-right head of a European nation since the end of World War II.

Hofer lost by just over 30,000 votes to former Green Party chief Alexander Van der Bellen. The final count gave Van der Bellen 50.3% to 49.7% for Hofer.

Holzinger said the court had no choice but to call for a rerun, noting that the irregularities affected nearly 78,000 votes — more than twice the margin separating the two candidates.

“There was room for manipulation,” Hofer said after the court’s decision. “What exactly these people (vote counters) did is beyond my knowledge.”

The Interior Ministry had acknowledged some irregularities but said the number of votes affected was not enough to overturn the results.

The runoff was unusual because the candidates for the major parties that had run Austria for decades had lost in the preliminary round of voting, casualties of the populist backlash sweeping much of Europe. Since World War II, Austria's president has come from either the left-leaning Social Democrats or the conservative People’s Party.

Austria's presidency is largely a ceremonial post, but the occupant can influence national policy and the election of government representatives.

Austria presidential runoff a photo finish

Hofer held a thin lead based on votes cast on May 22, but he was declared the loser after more than 700,000 postal ballots were counted on May 24.

The Freedom Party claimed that absentee ballots were handled illegally in 94 out of 117 electoral districts. It said ballots were counted by unauthorized personnel or without observers present, and that Austrians under the voting age of 16 and foreign nationals were allowed to cast ballots.

Interior Minister Wolfgang Sobotka said the date of the new election will be set after government consultations on Tuesday. He also threatened disciplinary measures for the election officials concerned.

“We have made mistakes,” outgoing President Heinz Fischer said in a statement, adding that he was proud of the Constitutional Court’s work. “In the end this will go down positively in the country’s history.”

The court’s decision means Fischer will be replaced temporarily by three parliamentary officials, including Hofer, until the new election is held.

“We need to respect the court’s decision,” said Lothar Lockl, Van der Bellen’s election campaign head. He promised to galvanize a “citizen’s movement” to help Van der Bellen win the new election.

Van der Bellen told reporters after the ruling, “I plan to win.”

“This isn’t a game. I call on all citizens to use their right to vote,” he said. “Our democracy needs engaged people."

Stefan Sengl, a Vienna-based independent political analyst, told USA TODAY that a new election "slightly favors Norbert Hofer because he is now the candidate who has suffered.”

Austria Overview