The ruling Justice and Development Party (AKP) narrowly lost Turkey's biggest city in March local elections, its first defeat in the city in 25 years.
The AKP claims there were "irregularities and corruption" in the vote and demanded a re-run of the mayoral election, which was won by Ekrem Imamoglu, of the main opposition Republican People's Party (CHP) by just 15,000 votes.
Imamoglu received his official mandate after two weeks of recounts, sending shockwaves through the ruling party since Erdogan, former mayor of the city, once said winning Istanbul was like winning the whole of Turkey.
Erdogan had presented the local elections as a matter of national survival. He campaigned heavily even though he was not running himself.
The AKP still won the most seats nationwide, but anger over the deteriorating economy led it to lose mayorships in both Istanbul and the capital Ankara.
The party did not request a re-run of the election for the Istanbul local assembly, in which it won a majority of seats.