The party of Turkey’s President Recep Tayyip Erdogan has lost control of the capital, Ankara, in local elections in what is being seen as a setback to his 16 years in power.
The opposition is also ahead in the contest for mayor of the largest city, Istanbul, the election commission says.
Nationally, the president’s AKP-led alliance has won more than 51% of the vote in the municipal elections.
“If there are any shortcomings, it is our duty to correct them,” he said.
Mr Erdogan had previously said the poll was about the “survival” of the country and his party.
Sunday’s election came amid an economic downturn and was widely seen as a referendum on his leadership.
More than 57 million people in the country were registered to vote for mayors and councillors.
What are the results?
The secularist Republican People’s Party (CHP) candidate Mansur Yavas won in Ankara.
In Istanbul, the election commission said the CHP’s Ekrem Imamoglu was leading by only 28,000 votes, but added that the results of more than 80 ballot boxes were being challenged.
Both CHP and Mr Erdogan’s AKP – or Justice and Development Party – had been claiming victory in the city, previously governed by the AKP.