Updated

The Latest on Turkey's local elections (all times local):

1:45 p.m.

The opposition candidate running to be Istanbul's next mayor has declared victory after unofficial results showed him leading in Turkey's local elections.

Ekrem Imamoglu, the candidate from an alliance led by the secular Republican People's Party, thanked all Istanbul voters on Monday.

Unofficial results by state-run Anadolu news agency said he had won 48.8 percent of the vote Sunday and his opponent, former Prime Minister Binali Yildirim of the ruling party, had captured 48.5 percent. One percent of the votes were still to be counted.

Parties have three days to file objections and official results are expected in the coming days.

If the opposition won in Istanbul, Turkey's largest city and commercial hub, that would be a watershed moment. Erdogan's own ascent to power began in 1994 as Istanbul mayor and the city has been held by his party and allies for 25 years.

___

10 a.m.

Turkish President Recep Tayyip Erdogan declared victory in municipal elections but the opposition's success in key cities dealt a significant blow to his party's dominance.

According to unofficial results, the ruling party lost the capital, Ankara, and the head of Turkey's electoral board said the opposition was also leading in Istanbul.

Sunday's local elections were widely seen as a test of support for Erdogan as the nation of 81 million people faces a daunting economic recession with double-digit inflation, rising food prices and high unemployment.

Ballot counts were still underway Monday morning in an anxious wait for Istanbul, Turkey's largest city and commercial hub. Both candidates —Ekrem Imamoglu for secular Republican People's Party, or CHP, and former Prime Minister Binali Yildirim for the ruling party— claimed they had won.

Electoral board head Sadi Guven said votes were still being counted.

___

Fraser reported from Ankara.