Recep Tayyip Erdogan said his ruling party would make up for its "shortcomings” after Turkish voters handed it a series of stinging local election defeats amid widespread frustration over the economy.
The Turkish president’s Justice and Development Party (AKP) lost control of the mayorship of Ankara for the first time in 25 years and preliminary figures appeared to show they had also lost the mayor’s race in Istanbul.
The results are arguably the worst showing for the AKP since it first came to power in 2003 and prompted victory celebrations among the Turkish opposition.
Mr Erdogan, who has held power for 15 years and presided over a crackdown on the free media and political opponents, campaigned relentlessly and described the local elections as “a matter of survival” for the country.
However, it was not enough to overcome public anger over the economy, which is currently in recession and has been dogged by a weakened currency that has damaged businesses and hurt families’ finances.
Speaking in Ankara, Mr Erdogan appeared somewhat chastened by the voters’ rebuke of his party. "If there are any shortcomings, it is our duty to correct them,” he said. “Starting tomorrow morning, we will begin our work to identify our shortcomings and make up for them."
Turkish officials said the president may reshuffle his cabinet ministers as a way of signalling to both voters and the markets that he understood their frustration.
Mr Erdogan nonetheless claimed victory on the grounds that the AKP and its nationalist allies had still won more than 50 per cent of the vote nationwide.
AKP officials also said they planned to dispute the results in both Ankara and Istanbul, where their secular rivals, the Republican People’s Party (CHP), had claimed victory.
The AKP candidate in Istanbul, Binali Yildrim, was trailing by 25,000 votes out of around 10 million total votes cast and refused to conceded.
Mr Erdogan was elected mayor of Istanbul in 1994 and his allies have held the post ever since, meaning defeat there would be a blow to the president’s personal legacy.
The gap was larger in Ankara, where the AKP candidate appeared to have lost 51 per cent to 47 per cent to a CHP challenger. The AKP said it planned to challenge the results there also.
"The people have voted in favour of democracy, they have chosen democracy," said Kemal Kilicdaroglu, the leader of the CHP.
Rusen Cakir, a prominent Turkish commentator, said the results were as important as those in 1994, when Mr Erdogan first became mayor of Istanbul. “It is is a declaration that a page that was opened 25 years ago is being turned,” he said.
The results do not affect Mr Erdogan’s grip on the presidency nor his control of parliament, where the AKP retains control through an agreement with a smaller nationalist party.
However, mayors have significant powers in Turkey and the CHP victories are likely to mean significant changes in how the country’s largest cities are run.
Turkey has no scheduled elections for the next four years so it may be difficult for the opposition to turn its local election victories into broader political momentum.
A team of election observers from the Council of Europe said it was “not fully convinced that Turkey currently has the free and fair electoral environment which is necessary for genuinely democratic elections”.
Turkey’s media is overwhelmingly loyal to Mr Erdogan and his political opponents have faced arrest and harassment by state authorities as they tried to challenge the AKP.
While Mr Erdogan took deliberately pragmatic positions during his first years in office, he has become more hardline over time, developing a political brand based on a combination of Islamism, authoritarian nationalism, and economic populism.
He has moved aggressively to stamp out dissent in the three years since a failed coup against him in 2016. However, the CHP and other opposition parties retain large memberships and the infrastructure to fight elections.