BELGRADE – The Austrian constitutional court has ruled that the country’s presidential election must be held again. The vote, which took place on May 22, saw far-right candidate Norbert Hofer narrowly lose.

Hofer, who was running for the Freedom Party (FPO), lost an incredibly tight election by just 31,000 votes, with Alexander Van der Bellen, a former economics professor endorsed by the Green Party, claiming victory.

The final count showed that Van der Bellen had 50.3 percent of the vote, compared to Hofer’s 49.7 percent. However, Austria’s highest court says the election needs to be re-run after ruling in favor of the Freedom Party, which alleged gross irregularities had taken place with regard to the absentee vote count.

“The contestation is allowed to go forward. The proceedings of the second ballot of the federal presidential election of 22 May 2016 will be annulled, from the announcement of 2 May 2016 by the Federal election institution; in as far as it contains the decree of a second ballot. To put it simply: this means that the entire second vote will have to be repeated across Austria,” said Gerhard Holzinger, the head of Austria’s constitutional court.

The far-right party said the law had been broken in most of the 117 electoral districts, and this included the sorting of absentee ballots before electoral commission officials arrived at the scene. Other alleged irregularities concerned the way the ballots were counted, including the premature processing of postal votes.

In June, the Interior Ministry said it had thrown out 23,000 votes because they were counted or processed before 9am on the day of the election. A further 2,000 votes were also declared void due to more serious violations, which included some underage teenagers casting ballots.

“Because … of the enormous amount of postal voting ballots it would barely have been possible to provide a result in time starting on the Monday at 9 a.m.,” Innsbruck-Land voting district head Wolfgang Nairz told the court, according to Reuters.

The election is expected to be re-run in either September or October this year.

Hofer and the FPO had been campaigning under an “Austria first” mantra and had voiced their strong opposition to “forced multiculturalism, globalization and mass immigration.” The stance earned Hofer a surge in support due to the deepening frustration at the current ruling parties and how they are dealing with the refugee crisis that has engulfed Europe.