(Bloomberg) -- Austria’s opposition Socialist Party reversed the result of a closely contested leadership race on Saturday after an electoral committee discovered a mistake in its vote tally.

Small-town mayor Andreas Babler had in fact won the ballot with 52% support, electoral committee head Michaela Grubesa told a press conference Monday, pointing to a mix-up in the Excel table used to tally results.

The party had wrongly declared Burgenland governor Hans Peter Doskozil as the winner at the congress, she said.

The blunder risks further fueling disunity in a party that had already been divided by a messy leadership campaign after years of infighting. Former leader Pamela Rendi-Wagner called the vote to quell Doskozil’s criticism and provide a clear mandate heading toward Austrian parliamentary elections due next year.

But the contest turned into a three-way race with Babler emerging as an unlikely candidate, as he pledged a return to leftist policies. Rendi-Wagner resigned after losing an initial vote of all party members last month. 

For the party, the electoral commission’s mishap risks further eroding credibility. One of Austria’s two traditional major parties, the Socialists have been out of government since 2017.

Doskozil is set to hold a briefing at 4:30 p.m. in Eisenstadt, in eastern Austria.

©2023 Bloomberg L.P.