Istanbul: Millions of Turks were voting Sunday in what is being billed as the most crucial election in years.
The vote was called after the Justice and Development Party (AKP), indomitable for 13 years, lost its majority in a June election and failed to form a coalition.
Turkey is more divided than ever, its security forces again fighting Kurdish rebels and is also under the threat from the Islamic State group.
Here are the key players:
The 'Sultan'
As prime minister and now president, the charismatic but brash Recep Tayyip Erdogan has dominated Turkish politics for more than a decade but is an increasingly polarising figure, reviled as much as he is revered.
His supporters hail him as a transformative leader who ended years of instability and dragged Turkey out of an economic meltdown after he took office in 2003.
But many denounce him as an autocrat who has cracked down on opponents and the media and is bent on Islamising the staunchly secular country.
Accused of absurd extravagance over his vast presidential palace, he was severely damaged by a corruption probe in his final months as premier.
His goal of strengthening the powers of head of state into a US-style executive presidency was scuttled by the June vote -- but he continues to play a major role in politics.
He is vehemently opposed to Syrian President Bashar al-Assad but his policy of supporting anti-regime rebels disastrously backfired after the emergence of IS.
The faithful lieutenant
Prime Minister Ahmet Davutoglu may well have to fight for his job if, as opinion polls predict, the AKP again fails to win an outright majority.
The 56-year-old former foreign minister is a faithful Erdogan ally, often dubbed by critics as the president's "puppet".
Davutoglu's usually mild-mannered demeanour belies his abilities as a tough negotiator and strategic thinker who had sought a pivotal role on the world stage as a mediator in Middle East conflicts.
The former academic was the chief architect of a "zero problems with neighbours" foreign policy but the Arab Spring left Turkey isolated in the region, while relations with the US and EU cooled.
The opposition accuses his government of complicity with IS, and holds him personally responsible for dragging Turkey into the Syrian quagmire.
The man to watch
The rising star of Turkish politics, Selahattin Demirtas led his pro-Kurdish Peoples' Democratic Party (HDP) to a remarkable breakthrough in June, securing 80 seats and stripping the AKP of its majority.
A 42-year-old human rights lawyer, Demirtas is dubbed the "Kurdish Obama" for his rhetorical skills, and the HDP has succeeded in attracting non-Kurds with a message of sexual equality, gay rights, secularism and socialist economics.
But he has made a dangerous enemy of Erdogan and the AKP, which accuses the HDP of being an accomplice to the "terrorists" of the outlawed Kurdistan Workers' Party (PKK).
Demirtas vehemently denies this, although his brother has joined PKK ranks in Iraq. He accused Erdogan of security failings after the attacks on an Ankara peace rally in October which killed 102 people, many of them HDP members.
Ankara's longtime foe
The PKK, considered a terrorist group by Turkey and its Western allies, has waged an armed campaign seeking greater autonomy for Kurds in the southeast since 1984.
After almost three years of negotiations, the PKK tore up a 2013 truce and resumed attacks against security forces after a July bombing on pro-Kurdish activists in Suruc on the Syrian border killed 34 people.
The PKK accuses Ankara of collaborating with IS jihadists, who are battling its fellow Kurdish fighters in Syria.
The military in July launched raids on PKK bases in Turkey and northern Iraq, dashing hopes of an end to the Kurdish rebellion that has killed 45,000 people.
After the Ankara bombing, the PKK announced a unilateral ceasefire, a move seen as an attempt to calm tensions for the election.
PKK leader Abdullah Ocalan, who could hold the key to reviving peace talks, is sidelined in a heavily-guarded Turkish island prison.
Seventy-two PKK members, among them founder member Cemil Bayik, acting leader Murat Karayilan and senior commander Duran Kalkan, are on a new Turkish most wanted list.
The new threat
The Islamic State is blamed for a string of attacks including the Ankara bombings which prosecutors say was the work of a sleeper cell acting on orders from IS in Syria to disrupt Sunday's vote.
Turkey was chastised by NATO allies for not taking a tougher line against IS as it seized swathes of northern Iraq and Syria and battled US-backed Kurdish militias.
Ankara, which initially supported Islamist rebels in Syria, was pressed into taking military action against IS after the Suruc attack, but used the offensive to also target PKK fighters in Iraq.
Since the Ankara bombing, Turkey has stepped up its hunt for IS suspects -- rounding up dozens in a series of police raids.
The exiled cleric
US-based preacher Fethullah Gulen, 74, has been charged with "terrorism" for allegedly plotting to overthrow Erdogan through the activities of a so-called "parallel state".
The authorities claim Gulen supporters were behind a massive corruption probe in December 2013 that targeted Erdogan and his inner circle.
The government responded by purging the police and judiciary and arresting editors and businessmen seen as Gulen allies.
Just days before the vote, riot police stormed television stations owned by a conglomerate linked to Gulen, setting off alarm bells about press freedom in Turkey.
Gulen, who left for the US in 1999 to escape charges of anti-secular activities by the government at the time, had been a key supporter of the AKP for a decade after it took power in 2002 but rifts appeared in 2013.
AFP