FPO presidential candidate Norbert Hofer arrives for a news conference in Vienna, Austria, 24 May 2016. Lettering in background is part of a slogan reading: 'Danke Oesterreich' ('Thank You Austria'). Photo by Christian Bruna/EPA

Austria's knife-edge presidential election, in which the far-right Freedom Party (FPO) was only narrowly defeated, must be held again, the Constitutional Court ruled on Friday.

The court's decision gives the FPO a second opportunity to make its candidate the first far-right head of state in Europe since World War II. The ruling also comes one week after Britain's vote to leave the EU in the Brexit referendum delighted Euroskeptic groups such as the FPO. Concerns about immigration and jobs featured prominently in the Brexit referendum, as they did in Austria's tight presidential race.

The Austrian court concluded that there were widespread irregularities in the counting of the more than 700,000 postal ballots cast, and there was enough doubt over the election's outcome for a re-run to be ordered.

Norbert Hofer of the FPO lost the May 22 vote to former Greens leader Alexander Van der Bellen by less than one percentage point, or around 31,000 votes. The Brexit vote could buoy populist sentiment in a new election for the largely ceremonial post of president — or have a chilling effect on it.

The court said it was using its strict standard on the application of election rules. Those rules were broken in a way that might have influenced the result, but there was no proof that the count had been manipulated, it said in its ruling.