The AKP secured 317 seats in the 550-member parliament, winning back the majority it lost in a June election in defiance of opinion polls that had predicted another hung parliament.
It won almost half of the vote, with turnout among Turkey's 54 million-strong electorate at 85 percent.
The results mean the AKP, which has ruled the Muslim-majority country since 2002, will again be able to form a single party government, prompting fears it will allow Erdogan to further tighten his grip on power.
But support for the pro-Kurdish Peoples' Democratic Party (HDP) and the Nationalist Movement Party (MHP) slumped, according to results announced by Sadi Guven, chairman of the Higher Election Board.
More From This Section
The HDP -- which scored a historic breakthrough in June by becoming the first party representing Turkey's largest minority to enter parliament -- won 59 seats, down from 80 five months ago.
The MHP won only 40 seats, half the number it picked up in June.
Parliament is due to meet in its new session next Tuesday and choose a speaker, paving the way for the formal announcement of the new government.
The number of AKP seats falls short of the 367 needed to change the basic law and endow Erdogan with full-executive powers, but he has suggested he could go to the people in a referendum on the issue.