People in Turkey are voting in local elections that analysts say could determine the political future of Prime Minister Recep Tayyip Erdogan.
They are the first elections since mass protests erupted last June and a corruption scandal hit the government.
Mr Erdogan is not standing but has campaigned tirelessly in support of his Justice and Development Party (AKP).
The government blocked Twitter and YouTube in the run up to the elections, following a series of online leaks.
Mr Erdogan said social media was spreading misinformation.'Ottoman slap'
On Saturday pro- and anti-government factions held rival demonstrations in Istanbul, which saw the Gezi Park protests of May and June last year.
The opposition Republican People's Party is fighting there to win the mayor's office from Mr Erdogan's ally Kadir Topbas.
The BBC's James Reynolds in Istanbul says the opposition candidate, Mustafa Sarigul, drove around the city in an open-topped bus - throwing out red T-shirts to spectators leaning from their balconies.
Mr Erdogan is himself a former mayor of the city and the vote has become an unofficial referendum on his administration, our correspondent says.
The prime minister lashed out at his political opponents during a series of rallies on Saturday.
"They are all traitors," he told the crowd in Istanbul.
"Go to the ballot box tomorrow and teach all of them a lesson. Let's give them an Ottoman slap."
Mr Erdogan was forced to cancel a number of rallies on Friday on doctors' orders to rest his voice.'Foreign plot'
The prime minister has purged hundreds of people from the judiciary and police since several of his allies were arrested over a corruption scandal in December.
He has accused the judiciary of being behind a series of wiretaps and social media leaks allegedly exposing major corruption, and blamed the probe on a "foreign plot".
The scandal has pitted the prime minister against a former ally, US-based Islamic scholar Fethullah Gulen, who has many supporters in the police and judiciary.
Mr Erdogan and his Islamic-leaning AK Party have been in power for over a decade.
Sunday's local assembly and mayoral elections are being seen as a key test ahead of presidential elections in August and parliamentary elections next year.
The government faced major street protests last year sparked by plans to raze Istanbul's Gezi Park and redevelop it. The police crackdown galvanised anti-government demonstrators in several cities.
The anger which led to the unrest flared up again earlier this month, with the news of the death of a 15-year-old boy who had been in a coma since last June.