Austria's presidential runoff election must be held again, the Constitutional Court ruled on Friday, handing the Freedom Party's narrowly defeated candidate another chance to become the first far-right head of state in the European Union.

The decision comes a week after Britain delighted anti-EU groups such as the Freedom Party (FPO) by voting to leave the bloc. Concerns about immigration and jobs featured prominently in the Brexit referendum, as they did in Austria's knife-edge election.

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

Norbert Hofer of the anti-immigration 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.

Whether a re-run of the vote for the largely ceremonial post of president will have a different outcome this time is unclear. The Brexit vote could buoy populist sentiment 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.