Turkey's Islamist-rooted AK Party swept to an unexpected victory in elections on Sunday, returning the country to single-party rule in an outcome that will boost the power of President Tayyip Erdogan but may sharpen deep social divisions.
With almost all ballots counted, the AKP had taken just shy of 50 percent of the votes, comfortably enough to control a majority in the 550-seat parliament and a far higher margin of victory than even party insiders had expected.
Erdogan said the outcome was a vote for stability, and a message to Kurdish insurgents in the country's restive southeast that violence could not coexist with democracy.
Prime Minister and AKP leader Ahmet Davutoglu tweeted simply "Elhamdulillah" (Thanks be to god), before emerging from his family home in the central Anatolian city of Konya to briefly address crowds of cheering supporters.
"Today is a victory for our democracy and our people ... Hopefully we will serve you well for the next four years and stand in front of you once again in 2019," he said.
At AKP headquarters in Ankara, under a sky lit by fireworks, he later urged Turkey's political parties to work together on a new constitution, which Erdogan has said he would like to see include executive powers for the presidency.
A senior official from the main CHP opposition, which had calculated on 'reining in' Erdogan's influence with a coalition government, described the result as "simply a disaster".
The outcome could aggravate deep splits in Turkey between pious conservatives who champion Erdogan as a hero of the working class, and Western-facing secularists suspicious of his authoritarianism and Islamist ideals.
In the mainly Kurdish southeastern city of Diyarbakir, security forces fired tear gas at stone-throwing protesters after support for the pro-Kurdish opposition fell perilously close to the 10 percent threshold needed to enter parliament.
In June, the AKP lost the overall majority it had enjoyed since 2002. Erdogan had presented Sunday's polls as a chance to restore stability at a time of tension over Kurdish insurrection and after two bombings, attributed to Islamic State, while critics fear a drift to authoritarianism under the president.
"The election results show that our nation has sided with looking after the environment of stability and trust that was risked on June 7," he said in a statement.
Since June's poll, a ceasefire with Kurdish militants has collapsed, the war in neighbouring Syria has worsened and Turkey - a NATO member state - has been buffeted by two Islamic State-linked suicide bomb attacks that killed more than 130 people.