Turkey’s election authority invalidated the results of Istanbul’s recent mayoral race, which had been seen as a jarring rebuke of President Recep Tayyip Erdogan’s leadership and part of a larger turn away from his party in a number of cities across the country. A new election is now scheduled to take place in late June after the reversal of the March 31st vote, which immediately sparked cries of foul play as Erdogan’s Justice and Development Party, or AKP, tries to keep its grip on power. The AKP had appealed the results of the Istanbul tally claiming irregularities after the opposition challenger Ekrem Imamoglu narrowly defeated Binali Yildirim, the AKP mayoral candidate. The election board said Monday that some officials overseeing the voting were not civil servants, which is against the law and, it said, enough to justify throwing out the previous vote in favor of a new one.

Despite benefiting from the election commission’s decision, the ruling puts Erdogan and the AKP in a newly precarious position. Division have emerged within the party over whether it was even advisable to push for a revote given the softening of Erdogan’s support in urban centers. The first race raised the national profile of Imamoglu, the ultimate winner, and a second race is likely to only expand his reach with voters. It’s also not clear if the result will be any different the next time around. “Analysts said the decision to challenge the results was a high-stakes gamble for Erdogan—forcing a replay of a vote that was largely seen as a referendum on his own leadership,” the Washington Post reports. “Imamoglu and other successful challengers nationwide had benefited from voter dissatisfaction with Turkey’s faltering economy, as well as a rare show of unity by the normally fractured political opposition.”

Whatever political dissatisfaction Istanbul voters were expressing after 18 years of Erdogan at the helm, pushing to invalidate an electoral loss seems unlikely to fix it. Not to mention, the Post reports, the new vote heaps pressure on the AKP because a second loss would confirm and highlight Erdogan’s fading aura of strongman inevitability. Even if the AKP wins, the thinking goes, it will look like the government cooked the books to get the result it wanted. Either way, Erdogan is entering a new phase where his leadership is more openly being questioned—even within his own party.