Erdogan, who has ruled Turkey for more than two decades and campaigned hard for the AKP in recent weeks, launched his political career as mayor of Istanbul in 1994.

"This election will lead to the beginning of a new era in our country," Erdogan said after casting his vote in Istanbul.

Erdogan's prospects have been helped by the collapse of the opposition alliance that he defeated last year, though current Istanbul mayor Imamoglu still appeals to voters beyond his main opposition Republican People's Party.

One factor working against Erdogan is a rise in support for the Islamist New Welfare Party due to its hardline stance against Israel over the Gaza conflict and dissatisfaction with the Islamist-rooted AKP's handling of the economy.

Incumbent CHP Mayor Imamoglu's main challenger is the AKP's Murat Kurum, a former government minister. Polls give Imamoglu a slight edge.