The AKP founded by the Turkish strongman 14 years ago reclaimed the parliamentary majority it lost just five months ago, confounding opinion polls which had predicted another hung parliament.
An emboldened Erdogan said the people of Turkeyhad voted for “stability” after renewed conflict with Kurdish rebels and a wave of bloody jihadist attacks since the last election in June.
Turkish stocks and the lira soared on the results, which ended five months of political uncertainty, but many were wary about the future of the troubled country under a more powerful AKP.
“The will of the nation has shown itself in favour of stability,” Erdogan told reporters after morning prayers at an Istanbul mosque.
He called for Turks to “remain united” and said the entire world should respect the result.
His Islamic-leaning conservative party won almost half the vote to secure 316 seats in the 550-member parliament according to final but unofficial results, easily enough to form a government on its own.
The result is a huge personal victory for the 61-year-old “Sultan”, who may now be able to secure enough support for his controversial ambitions to expand his role into a powerful US-style executive presidency.
“The AKP and Erdogan, now secure in their ruling posts, may adopt a unifying and inclusive stance”, including reviving the Kurdish peace process, Finansbank chief economist Inan Demir said.
But, he warned, Erdogan and the AKP may see the results as a licence to press on with their divisive policies: “Insistence on an executive presidency, unrelenting pressure on opposing business and media groups, aggressive foreign policy, hardline stance regarding the Kurdish issue and obsessive calls for lower interest rates.”
Prime Minister Ahmet Davutoglu hailed the result as a “victory for democracy”, saying there were “no losers, but winners”.
Speaking to thousands of people who waited for hours in the cold to hear him speak from the balcony of AKP headquarters in Ankara, he vowed to protect the rights of all of Turkey’s 78 million people.
‘What is awaiting us?’
AKP supporters honked their horns in celebration but many Turks greeted the result with dismay, and clashes erupted briefly in the main Kurdish city between police and angry demonstrators.
“I’m horrified. I don’t want to live in this country anymore because I don’t know what is awaiting us,” said Guner Soganci, 26, a waitress in Istanbul.
The AKP lost its majority for the first time in 13 years in June, when the pro-Kurdish People’s Democratic Party (HDP) entered parliament for the first time.
The political landscape has changed dramatically since then, with the country even more divided along ethnic, religious and political lines.
Analysts said it appeared voters had turned away from the nationalist and Kurdish parties after a surge in violence between Turkish forces and the outlawed Kurdistan Workers’ Party (PKK) in July led to the collapse of a fragile 2013 truce.
Turkey was also rocked by a string of attacks blamed on the Islamic State group, including twin suicide bombings at an Ankara peace rally last month that killed 102 people — the bloodiest in Turkey’s modern history.
The international community will also be watchingTurkey’s policy towards neighbouring Syria, after it was finally cajoled into joining the US-led coalition against IS and launched its own “war on terrorism” against the jihadists, PKK fighters and even US-backed Syrian Kurds.
Erdogan said in a late night statement that the vote result “delivered an important message for the PKK: oppression and bloodshed cannot coexist with democracy”.
Support fell for the HDP, which some accuse of being a front for the rebels, and the party only just managed to scrape past the electoral threshold of 10 percent to stay in parliament.
HDP leader Selahattin Demirtas said it was not a “fair election” after his party halted campaigning in the wake of the IS attacks that targeted pro-Kurdish activists, but vowed to pursue the peace process.
The main opposition Republican People’s Party (CHP) scored about 25 percent of the vote, similar to its June result.
Support for the Nationalist Movement Party (MHP) fell to just under 12 percent, with commentators suggesting its voters shifted to the AKP.
Another crucial issue for the new AKP administration will be the faltering economy, which has seen growth slow sharply from the dizzy heights of five years ago.
Initial reaction on financial markets to the vote result was positive.
The lira jumped 4.4 percent to 2.78 against the US dollar in early trade, around its highest level in seven years, while stocks were up more than five percent.