AKP secured 41%, a sharp drop from 2011, and must form a coalition or face entering a minority government.
The pro-Kurdish HDP crossed the 10% threshold, securing seats in parliament for the first time.
The Turkish lira and shares dropped sharply on June 8 as markets reacted to the news.
The Turkish currency fell to near-record lows against the dollar, and shares dropped by more than 8% soon after the Istanbul stock exchange opened.
Turkey’s central bank acted quickly to prop up the lira by cutting the interest rate on foreign currency deposits.
The election result is a blow to President Recep Tayyip Erdogan’s plans to boost his office’s powers.
Recep Tayyip Erdogan first came to power as prime minister in 2003 and had been seeking a two-thirds majority to turn Turkey into a presidential republic.
PM Ahmet Davutoglu said: “The winner of the election is again the AKP, there’s no doubt.”
He added: “Our people’s decision is final. It’s above everything and we will act in line with it.”
The HDP’s supporters were jubilant, taking to the streets to chant “we are the HDP, we are going to the parliament”.
HDP leader Selahattin Demirtas ruled out entering into a coalition with the AKP.
He said at a news conference in Istanbul “The discussion of executive presidency and dictatorship has come to an end in Turkey with these elections.”
With nearly all the votes counted, the AKP looks likely to win 258 seats in parliament, 18 fewer than it requires for a majority.
The Republican People’s Party (CHP) looks likely to be the second largest party, as in the previous parliament, polling around 25% of the vote.
In third place is the Nationalist Movement Party (MHP) on 16.5%, with the People’s Democratic Party (HDP) in fourth place with 13%.
The HDP is expected to finish with 75 to 80 seats after attracting votes beyond its Kurdish support base.
Many turned out to vote in the HDP’s heartland of Diyarbakir, two days after a bombing in the eastern city killed two people and injured 200 more.
The MHP’s leader Devlet Bahceli did not rule out the possibility of entering a coalition government, but said the results represented the “beginning of the end for the AKP”.
Once viewed as invincible, Recep Tayyip Erdogan’s party has been criticized in recent years for its clampdown on free speech and its growing authoritarianism.
After the official result is declared, Ahmet Davutoglu has 45 days to form a government.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…