Erdogan 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.
Turks voted on Sunday in local elections which President Tayyip Erdogan has described as a matter of survival for Turkey and which were marred 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 per cent 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 7 a.m. (0400 GMT) in eastern Turkey and an hour later in the rest of the country. Polling stations close at 4 p.m. in the east and 5 p.m. in the west.
Just over 57 million people are eligible to vote. 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.
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.
The election was marred by violence in the southeast.
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.
In Diyarbakir, two people were wounded and one of them was in critical condition after being stabbed in a dispute between candidates, a hospital source said.
The government took extensive security measures, with 553,000 police and other security forces on duty for the vote.
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 and more than four times in Ankara throughout his campaign.
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."