Results showed a narrow lead for the main opposition Republican People's Party (CHP) candidate, Ekrem Imamoglu. News of the defeat came after the AKP also lost the capital, Ankara.
Blaming irregularities in Istanbul, the AKP said it intends to use its right to object to results in all 39 of the city’s districts – according to reports in Turkey’s Hurriyet newspaper.
Voters cast ballots for mayors and heads of district across the country on Sunday, with the struggling economy emerging as a central election issue, albeit one that was ignored by Erdogan himself.
The loss of Istanbul is a huge blow to the 65-year-old leader, who cut his teeth there in the 1990s when he served as the city’s mayor.
The lira weakened in value Tuesday amid uncertainty over election results, which also stand to complicate his plans to combat Turkey’s recession.