ISTANBUL/ANKARA (Reuters) - President Tayyip Erdogan’s AK Party has submitted objections to local election results in all districts of Istanbul and Ankara, party officials said on Tuesday, after results showed the opposition earned narrow victories in both cities.

Supporters of Ekrem Imamoglu, main opposition Republican People's Party (CHP) candidate for mayor of Istanbul, wait for him to visit Anitkabir, the mausoleum of modern Turkey's founder Mustafa Kemal Ataturk, in Ankara, Turkey, April 2, 2019. REUTERS/Umit Bektas

The AK Party is on track to lose control of what are Turkey’s two biggest cities, its commercial hub of Istanbul and the capital Ankara, in a surprise election setback that may complicate Erdogan’s plans to combat recession.

In Istanbul, the mayoral candidate of the main opposition Republican People’s Party (CHP), Ekrem Imamoglu, and his AKP rival, ex-prime minister Binali Yildirim, both said on Monday Imamoglu was around 25,000 votes ahead. Istanbul has an estimated total population of 15 million.

The AKP had previously said it would use its right to object to the results where there were voting irregularities, adding that the errors at the ballots had affected the outcome.

On Tuesday, Bayram Senocak, the AKP’s Istanbul head said that objections had been submitted by the 3 p.m. (1200 GMT) deadline for appeals, and added that legal action would be taken against electoral officials who made the errors.

“We have submitted all our appeals to the district electoral councils,” Senocak said, as he waved ballot records in which he said vote count irregularities could be seen.

An AKP deputy chairman later said the difference between Imamoglu and Yildirim was down to 20,509 votes and would keep falling as a result of their appeals. He said the elections were “the biggest blemish in Turkish democratic history.”

The CHP’s Istanbul head Canan Kaftancioglu said her party submitted objections in 22 districts, adding they expected to receive 4,960 more votes after the appeals were resolved.

“They are trying to steal the will of the people as it was reflected in the ballots,” she told reporters in Istanbul.

Slideshow ( 7 images )

The CHP’s Imamoglu said on Tuesday he was saddened by the AKP failure to congratulate him after the election board count put him ahead.

“I’m watching Mr Binali Yildirim with regret. You were a minister of this nation, the parliament speaker and a prime minister,” Imamoglu said in Istanbul. “What could be more noble than congratulating?”

“The world is watching us with shame right now. We are ready to manage the big city of Istanbul. Let go and congratulate us with honor, so we can do our job,” he said.

“MOMENT OF BEGINNING”

Ahead of the elections, the CHP had formed an electoral alliance with the Iyi (Good) Party to rival that of the AKP and their nationalist MHP partners. The alliances nominated joint candidates in certain cities, including Ankara and Istanbul.

Imamoglu, who laid a wreath at the mausoleum of modern Turkey’s founder, Mustafa Kemal Ataturk, in Ankara, later went to CHP headquarters to meet Mansur Yavas, the opposition’s candidate in the capital. Speaking at the CHP building, Imamoglu said the elections marked a “moment of beginning” for Turkey.

In Ankara, Yavas received 50.9 percent of votes, ahead of his AKP rival and former minister Mehmet Ozhaseki in Sunday’s local elections by nearly 4 percentage points. The AKP said it had also submitted objections to results across Ankara.

Defeats in Ankara and Istanbul would be a significant setback for Erdogan, who has dominated Turkish politics for more than 16 years. He had campaigned relentlessly ahead of the vote, describing it as a “matter of survival” for the country.

Erdogan’s political success has rested on years of stellar economic growth in Turkey, but an economic recession that has brought surging inflation and unemployment and a plunging lira currency have taken their toll on his popularity.

Uncertainty generated by the local elections has added to pressure on the lira, which weakened sharply last week as a lack of confidence in the currency among Turks led them to snap up record holdings of dollars and gold.

On Tuesday the lira weakened more than 2 percent against the dollar on concerns about tensions with the United States after it halted delivery to Turkey of equipment related to the F-35 fighter aircraft.