With more than 99% of the votes counted, Republican People’s Party (CHP) candidate Ekrem Imamoglu was in the lead with about 54% of the vote, state news agency Anadolu reported on Sunday.
Imamoglu said “the whole Turkey won the election, not a group or party.”
“You stood up for the democracy tradition of more than one hundred years. Thank you Istanbul,” he added.
Official results were expected early Monday, according to the Turkish election board.
Crowds of Imamoglu’s supporters took to the streets of Istanbul after the unofficial results were announced. In street parties across the city, they celebrated what they saw as a vindication after Imamoglu’s original victory in March was annulled and a revote ordered.
Binali Yıldırım, the ruling Justice and Development Party’s candidate (AKP), had about 45%, Anadolu said.
Yıldırım appeared to concede the vote shortly after the unofficial results were announced, saying: “My rival seems to be leading the election. I congratulate him. This elections showed democracy is functioning in Turkey. I wish Ekrem İmamoglu will make good services to people. For his good services we will help him.”
Erdogan congratulated Imamoglu via his official Twitter account on Sunday, but added that his party will continue to work toward its goals “without giving up democracy, rule of law, peace, wealth and stability.”
If confirmed, the result would be a major blow for Erdogan. The long-time leader was hoping for a reversal of the original vote in March, which saw his AKP lose by a slim margin. The AKP challenged the outcome of that race, claiming fraud. In a controversial ruling, the Turkish election board canceled the result and ordered a new vote.
The March local election marked a political earthquake for Erdogan, who has been in power since 2003. AKP lost power to CHP in the country’s three largest cities: Ankara, Istanbul and Izmir.
Istanbul was a particularly painful defeat for the president, as his own political career started there.
Istanbul, the country’s biggest city, has seen a huge economic boom during the early years of the Erdogan administration. As the economic crisis hit much of the Western world, foreign investors poured their money into Turkey, looking for high returns from the emerging economy.
But the flow of money started to dry up as the US economy got stronger again. Turkish economic growth flattened, inflation reached double digits and unemployment soared.
The struggling economy has turned some residents of Istanbul against AKP.
Following a failed military coup attempt in 2016, Erdogan and his government have clamped down on civil liberties across the country, gutted public institutions and universities, heavily restricted the media and ordered mass arrests of activists, journalists and the political opposition.