Members of Turkey’s main opposition party have claimed that a decision to rerun the vote for Istanbul mayor, which the ruling party lost in March for the first time in a generation, is linked to a government bid to safeguard billions of dollars in grants to foundations that form a key part of its political apparatus.

The highly contentious decision, announced on Monday night, has drawn claims of an emerging “dictatorship” in Turkey and an electoral process increasingly subverted by the country’s political elite under the president, Recep Tayyip Erdoğan.

The candidate for the Republican Peoples’ party (CHP), Ekrem İmamoğlu, who won the original vote, on Tuesday walked back earlier threats to boycott the new poll, which a high election body has slated for 23 June, claiming he would stand again as a candidate.

The March vote stripped Istanbul, the engine room of the Turkish economy, from the control of the AKP for the first time in 14 years, and from Erdoğan’s influence for the first time in a quarter of a century. Defeats in Izmir and Ankara compounded the losses, but the Istanbul result hit hardest, posing stark threats to the AKP’s funding streams and organisational structure, which has long been sustained by the country’s biggest city.

The CHP member and former MP Bariş Yarkadaş claimed that under previous AKP administrations a large chunk of the budget allocated to the Istanbul municipality had been allocated to charities and foundations that were tied to the government and helped build its political base.

“For 25 years, Istanbul has been a main source of income and financing of their political movement,” he said. “According to the donation reports of the municipality, this year 847 million Turkish lira was donated to foundations that are connected to the government. The Archery Foundation and another foundation for religious schools. They are like the back garden of AKP.

“For AKP, the mayoralty is not there just to service Istanbul. It has a political, social and economic dimension. The big mayoral offices are in places that account for 70% of the Turkish economy. Losing them is the first signal that they will lose the presidency.”

İmamoğlu said AKP’s anger at the poll result had thrown the stakes into sharp focus: “From their level of anxiety, they act as though losing Istanbul is the end of everything. It would be [wrong] to call the apparent structure direct party financing. It is more of a beneficial relationship. It is a fact that organic links exist between the foundations, which are owned by relatives of party managers, and municipal donations. But some of those benefits may not be reaching the broader party.”

The AKP has refused to accept defeat, citing “irregularities and corruption” in the vote.

Erdoğan, who had been visibly angered in the days since the ballot, told a meeting of his party colleagues that “our people would have demanded an explanation from us” if a rerun had not been ordered.

“We see this decision as the best step that will strengthen our will to solve problems within the framework of democracy and law,” he said. “The documents we have presented are quite solid and based on concrete evidence which cannot be disputed. We sincerely believe there was organised corruption and irregularities.”

Murat Sun, 38, a shopkeeper from the Istanbul suburb of Eyüp, said the new poll could strengthen İmamoğlu. “I believe he will win by a bigger margin. We were all out yesterday banging pots and pans [in protest] and calling each other from our windows. I have a friend who is an AKP supporter and he thinks this moved pushed things too far. Making a victim [out of İmamoğlu] will help him win again. If AKP loses one more election, how can they go to the 2023 presidential poll?”

Gürsel Tekin, an Istanbul MP for CHP, said: “They chose to destroy the law because they could not accept it. This unfair decision was a major blow to free and fair elections. Therefore, our struggle to win Istanbul is essentially the struggle to regain democracy in this country.”

The Turkish lira had fallen to 6.13 against the dollar near the close of trade. The currency has fallen nearly 10% since the week before the election.