Opinion polls suggested the candidate of an opposition alliance, Mansur Yavas, could end the longtime rule of Erdogan's Justice and Development Party in Ankara. A former government environment minister, Mehmet Ozhaseki, is running for mayor under the banner of Erdogan and his nationalist allies.
Another closely watched mayoral election is in Istanbul. Erdogan began his rise to power as the city's mayor in 1994 and has said at campaign rallies that "whoever wins Istanbul, wins Turkey."
Erdogan named former Prime Minister Binali Yildirim to run against opposition candidate Ekrem Imamoglu in the Istanbul mayor's race. The president spoke at six rallies in Istanbul on Saturday.
Erdogan has campaigned tirelessly for Justice and Development Party candidates and framed the municipal elections taking place across Turkey on Sunday as matters of "national survival."