File Photo of Turkish President Recep Tayyip Erdogan.
Turkey's long-dominant Justice and Development Party (AKP) scored a stunning electoral comeback on Sunday, regaining its parliamentary majority in a poll seen as crucial for the future of the troubled country.
The party founded by President Recep Tayyip Erdogan won over 49 percent of the vote to secure 315 seats in the 550-member parliament with nearly all votes counted, easily enough to form a government on its own.
"Today is a day of victory," a beaming Prime Minister Ahmet Davutoglu told a crowd of supporters in his hometown. "The victory belongs to the people."
The outcome was a shock to many as opinion polls had predicted a replay of the June election when the AKP won only 40 percent of the vote and lost its majority for the first time in 13 years.
It is however a huge personal victory for 61-year-old Erdogan, Turkey's divisive strongman who may now be able to secure enough support for his controversial ambitions to expand his role into a powerful US-style executive presidency.
Turks voted in large numbers, with the country deeply polarised in the face of renewed Kurdish violence and a wave of bloody jihadist attacks along with mounting concerns about democracy and the faltering economy.
And underscoring one of the key challenges ahead for a new AKP administration, police fired tear gas and water cannon on protesting Kurdish militants who set fire to tyres and pallets in the main Kurdish city of Diyarbakir.
"Sense of instability in Turkey, coupled with Erdogan's 'strong man who can protect you' strategy has worked," Soner Cagaptay, director of the Turkish Research Program at the Washington Institute for Near East Policy said on Twitter.
During the election campaign, Erdogan declared that only he and his loyal Prime Minister Ahmet Davutoglu could guarantee security, criss-crossing the country with the message: "It's me or chaos."
A report by the Brookings Institution think-tank had warned that whatever the outcome, "the challenges facing Turkey are growing by the day".
It highlighted the Kurdish crisis, the parlous state of the economy and the conflict in neighbouring Syria.
The political landscape has changed dramatically in Turkey since June, with the country even more divided along ethnic and sectarian lines.HDP scrapes in
Many Turks are fearful of a return to all-out war with outlawed Kurdistan Workers' Party (PKK) rebels after fresh violence shattered a 2013 truce in July, just a month after a pro-Kurdish party won seats for the first time and denied Erdogan's AKP a majority.
This time round, the People's Democratic Party (HDP), led by charismatic lawyer Selahattin Demirtas, lost support but appeared to have scraped over the 10 percent threshold to stay in parliament.
The vote for the Nationalist Movement Party (MHP) fell to around 11 percent from 16 percent in June, with commentators suggesting its supporters had shifted to the AKP.
The main opposition Republican People's Party (CHP) had about 23 percent.
The threat of further jihadist violence had overshadowed the poll after a string of attacks blamed on the Islamic State group, including twin suicide bombings on an Ankara peace rally last month that killed 102 people -- the bloodiest in Turkey's modern history.
The election board said 85 percent of the 54 million registered voters cast their ballots, topping the June election when turnout was 84 percent.
There were queues at many polling stations visited by AFP.
"I'm very sorry but the results mean that the people are comfortable with the current situation," said 22-year-old law student Sevim.
"People get the governments they deserve. So we got what we deserve."Turkey's 'big master'
Erdogan, dubbed the "big master" or "Sultan" who has dominated Turkey's political scene for more than a decade, is revered and reviled in equal measure.
He was hailed in the West for creating what was once regarded as a model Muslim democracy but is now seen as increasingly autocratic.
Opponents fear that if he succeeds in expanding his role into a powerful US-style executive presidency, it would mean fewer checks and balances.
A string of high-profile raids against media groups deemed hostile to Erdogan and the jailing of critical journalists have set alarm bells ringing about the state of democracy in a country that has long aspired to join the European Union (EU).
Turkey is also struggling with its policy on neighbouring Syria which has left it at odds with its NATO allies, and the burden of more than two million people who have taken refuge from a war well into its fifth year.
After long supporting rebels fighting the Damascus regime, Ankara was cajoled into joining the US-led coalition against the IS group and launched its own "war on terrorism" targeting the jihadists as well as PKK fighters.
Turkey's economy is also in trouble, with growth slowing sharply from the dizzy heights of five years ago, unemployment rising and the Turkish lira plunging more than 25 percent in value this year.
But the result is a major public relations victory for Erdogan shortly before he hosts world leaders including US President Barack Obama at the G20 summit on November 15-16.