Turks voted on Sunday in local elections which President Tayyip Erdogan has described as a matter of survival for Turkey and which were tarnished by violence that left two party members dead in the country's southeast.
Erdogan, who has dominated Turkish politics for more than 16 years thanks in part to strong economic growth, has become the country's most popular, yet also most divisive, leader in modern history.
However, he could be dealt an electoral blow with polls indicating his ruling AK Party (AKP) may lose control of the capital Ankara, and even Istanbul, the country's largest city.
With the economy contracting following a currency crisis last year in which the lira lost more than 30 percent of its value, some voters appeared ready to punish Erdogan, who has ruled with an increasingly uncompromising stance.
“I was actually not going to vote today, but when I saw how much they (AKP) were flailing, I thought this might be time to land them a blow. Everyone is unhappy. Everyone is struggling,” said 47-year-old Hakan after voting in Ankara.
Voting started at 7am (0400 GMT) in eastern Turkey and an hour later in the rest of the country.
The voting ended for local elections in all 81 provinces across Turkey at 5pm local time (1400GMT).
Under a broadcast ban imposed by the Supreme Election Council (YSK), media organisations are not allowed to broadcast any political advertising, predictions or comments about the polls from 6pm local time (1500GMT) until 9pm (1800GMT).
The YSK reserves the right to lift the broadcasting bans before 9pm.
A total of 12 political parties are competing in the local elections.
More than 44 million citizens were expected to vote at 142,777 polling stations in 30 largest cities, called metropolitan municipalities. Meanwhile, 12.8 million voters were expected to vote at 51,851 polling stations in other 51 provinces.
A clear picture of the winners will probably emerge around midnight.
This week, as authorities again scrambled to shore up the lira, Erdogan cast the country's economic woes as resulting from attacks by the West, saying Turkey would overcome its troubles following Sunday's vote and adding he was “the boss” of the economy.
“The aim behind the increasing attacks towards our country ahead of the elections is to block the road of the big, strong Turkey,” Erdogan said at a rally in Istanbul on Saturday.
Sunday's elections, in which Turks vote for mayors and other local officials across the country, are the first since Erdogan assumed sweeping presidential powers last year and will be a reckoning for his government, which has come under fire for its economic policies and record on human rights.
The previous local elections were held in 2014.
Violence mars voting
The election was marred by violence in the southeast and Istanbul.
Two members of the small Islamist Felicity Party, a polling station official and an election observer, were shot dead in Malatya province, a party spokesman said. Media reports said one person had been detained.
After voting in Istanbul, Erdogan said he was saddened by the incident and that it was being thoroughly investigated. Some 553,000 police and security force members were on duty for the vote nationwide.
In Diyarbakir, two people were hurt, one of them critically, after being stabbed in a dispute between candidates, a hospital source said. Dozens of people were hurt in other election-related clashes in the southeast, media reported.
One person was stabbed as 15 people clashed in a row between candidates in Istanbul's Kadikoy district, a police source said.
Defeat in Ankara or Istanbul would end nearly a quarter of a century of rule by Erdogan's AKP or its predecessors in those cities and deal a symbolic blow to Turkey's leader.
Ahead of the vote, the main opposition Republican People's Party (CHP) and Iyi (Good) Party formed an electoral alliance to rival that of the AKP and its nationalist MHP partners.
The pro-Kurdish opposition Peoples Democratic Party (HDP), which Erdogan has accused of links to Kurdish militants, has not made an official alliance and is not fielding candidates for mayor in Istanbul or Ankara, which is likely to benefit the CHP.
The HDP denies links to the outlawed militant Kurdistan Workers' Party. Two years ago, the state took control of about 100 municipalities from an HDP-affiliated party and some voters in the main southeastern city of Diyarbakir said services there had improved as a result.
“Before, this city did not have the services I have now seen. I gave my vote to the AK Party for services to continue,” said tradesman Haci Ahmet Beyaz, 43.
In the days leading up to the vote, Erdogan held around 100 rallies across the country, speaking 14 times in different districts of Istanbul over the past two days alone.
He has described the elections as an existential choice for Turkey, blasting his rivals as terrorist supporters aiming to topple the country. He has warned that if the opposition candidate wins in Ankara, residents would “pay a price”.
His opponents have denied the accusations and challenged his characterisation of the elections as a matter of survival, saying Erdogan had led the country to its current state.
“What matter of survival? We're electing mayors. What does this have to do with the country's survival?” Kemal Kilicdaroglu, head of the CHP, told a rally in Eskisehir.
With reference to Erdogan, Kilicdaroglu said: “If there is a survival issue in Turkey, it's because of you.”