Turkey's main opposition party appeared on course to seize control of Ankara in Sunday's local elections and defeat President Recep Tayyip Erdogan's ruling AK Party in the capital for the first time since Erdogan came to power 16 years ago.
In Istanbul, CHP's Imamoglu and AKP's Binali Yildirim are involved in a neck-and-neck race, with the latter having received 48.71 percent of votes against Imamoglu's 48.65 percent after 98 percent of ballots having been counted.
Turkish President Recep Tayyip Erdogan said his ruling party has emerged the victor of Turkey's mayoral elections "by a wide margin". "Everyone is unhappy. Everyone is struggling", said 47-year-old Hakan after voting in Ankara. Two people were shot dead at a polling station in the eastern city of Malatya. He has said "whoever wins Istanbul, wins Turkey".
Mr Erdogan's ruling party has renewed an alliance with the country's nationalist party to increase votes.
A former government environment minister, Mehmet Ozhaseki, ran for mayor under the banner of Mr Erdogan and his nationalist allies.
The Turkish leader campaigned hard portraying the vote for mayors and district councils as a fight for survival, but the election became a test of AKP´s support as an economic slowdown took hold after a collapse of the lira currency.
"I would like to announce to Istanbul's residents and all of Turkey that our numbers show that it is clear we won Istanbul", Imamoglu said in a speech. Final results of the elections will elect mayors and officials in over 81 of Turkey's municipalities, 49 of which are now governed by Erdogan's AK Party.
Meanwhile, opposition Nation's Alliance, between the main opposition Republican People's Party (CHP) and the Good Party, gained 37.6 percent of the votes.
The Turkish president called Sunday's local elections a "keystone of democracy" and said if his party does well it would add "great power" to the administration.More news: Gonzaga Star Has Heartbreaking Quote After Elite Eight Loss
Opposition parties coordinated strategies and put forward candidates under alliances in an effort to maximize the chances of unseating members of the Justice and Development Party, known in Turkish by the acronym AKP. The ruling party accused his opponent Yavas of forgery and tax evasion.
Erdogan campaigned tirelessly for AKP's candidates, framing the municipal elections as a matter of "national survival".
The election was marred by violence in the southeast and Istanbul.
Throughout the campaign Erdogan sought to move the agenda away from economic woes, instead focusing on security concerns, and the threat posed by Kurdish separatists, along with a religious agenda.
Recep Tayyip Erdogan and his wife Emine greet supporters in Ankara.
The unofficial results imply that the city's residents, who have borne the brunt of the PKK's tactics, have seen improvements in their daily lives after Ankara removed HDP mayors and replaced them with central government-appointed trustees.
The Turkish leader noted that a pro-Kurdish party - which he branded as terrorists for their alleged links to outlawed Kurdish rebels - had suffered losses in the country's mostly-Kurdish populated regions.
But in crucial mayoral races, the CHP declared victory in the capital, Ankara, and in the major city of Izmir.