President Tayyip Erdogan sought a crushing victory for his vision of a "new Turkey" at elections on Sunday that would furnish him with sweeping executive powers opponents say could undermine democracy.
But Erdogan's ambitions could be thwarted by a Kurdish-rooted opposition party that is looking to enter parliament for the first time, and could put an end to 12 years of single-party rule for the AK Party Erdogan founded.
The mood was tense at some polling stations, particularly in the mainly Kurdish southeast, after a bombing on Friday killed two people and wounded at least 200 at a rally for the pro-Kurdish Peoples' Democratic Party (HDP).
The attack has sharpened attention on the HDP, which is looking to enter parliament for the first time as a party. Its success could help put an end to a three-decade Kurdish insurgency and keep Erdogan's political ambitions in check.
Erdogan hopes the ruling AKP can win a resounding majority to change the constitution and create a U.S.-style executive presidency. Opponents say his vision of the presidency would lack necessary checks and balances.
"They say 'If Erdogan gets what he wants on Sunday he will be unstoppable'," Erdogan told a rally in the northeastern province of Ardahan on Saturday.
"They actually mean Turkey will be unstoppable."
NATO member Turkey is seen by the West as a key ally bordering Iraq, Syria and Iran and prized for its stability. Erdogan, while maintaining ties, has promoted the image of a state less inclined than in the past to do Washington's bidding.
While the AKP is expected to again be the largest party, it may be unable to secure an outright majority if the HDP crosses the 10 percent threshold required to enter parliament. The HDP has widened its appeal beyond its Kurdish core vote, to center-left and secularist elements disillusioned with Erdogan.
"I am certain the HDP will exceed the threshold. My only worry is the theft of votes," said Bahar Haram, a 25-year-old social services worker voting in Diyarbakir, the biggest city in the southeast, where the HDP draws most of its support.
Like many people in the region, Haram said her priority was an end to the conflict between Ankara and the militant Kurdistan Workers Party (PKK), which took up arms in 1984 in an insurgency that has killed 40,000 people.
Ankara launched peace talks with the PKK more than two years ago. The HDP's presence in parliament could be crucial to pushing the process forward, analysts have said.
There were allegations of fraud and intimidation on social media, although there were no official reports.
"Stability or crisis"
While constitutionally required to stay above party politics, Erdogan has held frequent rallies throughout a confrontational election campaign, joining Prime Minister Ahmet Davutoglu in attacking opposition parties.
The two have portrayed the election as a choice between a "new Turkey" or a return to a history marked by short-lived coalition governments, economic instability and coups by a military whose influence Erdogan has now reined in.
"Either the stability of the last 12 years will continue, or there will be the crisis scenario of those who want to take Turkey back to the chaos and crisis atmosphere of the 1990s," Davutoglu told a rally in the southern city of Antalya.
Erdogan has championed religious conservatives who he says were treated as second-class citizens over decades of secularist rule and cultivates an image of Turkey that draws more on its Ottoman history, orienting it to the Middle East rather than the West.
It is a message which resonates with voters in Turkey's Anatolian heartland, including the city of Konya, an AKP stronghold where Davutoglu was set to vote.
"I voted for the AK Party and for Davutoglu. He's an honest man, a good Muslim, he prays five times a day, and he's from Konya like us," said 59-year-old Ekrem Bal, twirling prayer beads as he stood outside a polling station.
But Erdogan may lose votes of some Turks, especially the secularly minded, perturbed by his increasingly religious, and combative, tone. Others impressed by democratic reforms in his first two terms of government may now be disenchanted by a clampdown on the media and apparent intolerance of criticism.
In conservative quarters, some see him as too conciliatory towards the Kurds. The PKK is designated a terrorist organization by the United States and EU as well as Turkey.
"I am worried. I don't want the HDP to cross the threshold because of their links with terrorists," said 45-year-old Tahsin Karaman, a night security guard, voting in Istanbul.
"I used to support the AK Party but this time I am voting for the MHP. It's a warning vote," he said, referring to the rightist Nationalist Movement Party (MHP).
(Additional reporting by Humeyra Pamuk in Diyarbakir and Jonny Hogg and Tuvan Gumrukcu in Konya; Writing by Daren Butler and David Dolan; Editing by Ralph Boulton)
Word Count: 860