Turkish Prime Minister Ahmet Davutoglu has formally given up trying to form the next government after weeks of coalition talks failed, raising the prospect of a fractious interim administration.

Davutoglu met President Recep Tayyip Erdogan on Tuesday to formally acknowledge he cannot form a coalition government, paving the way for new elections just months after June polls.

In line with procedure, Davutoglu returned to Erdogan the mandate he received from the president on July 9 to begin coalition talks with opposition parties, the president's office said in a statement.

With all possibilities exhausted before a August 23 deadline to form the new government, Turkey is now facing snap new polls and entering uncharted political territory.

RELATED: End of Turkey-PKK ceasefire puts HDP in a tough spot

The elections should be held 90 days after they are called, meaning that Sunday, November 22 would be a possibility were Erdogan to call the polls shortly after the expiration of the August 23 deadline.

In a major setback for Erdogan, the ruling AK Party lost its overall majority in the June 7 legislative polls for the first time since it came to power in 2002.

Al Jazeera's Bernard Smith, reporting from Istanbul, said since the AK Party lost its majority, it has not been able to find new coalition partners.

He said the ruling party lost its majority primarily because the pro-Kurdish Peoples' Democratic Party (HDP) won more than 10 percent of the vote, for the first time getting representation in the assembly.

"The AK Party was forced to look for coalition partners and it has not been able to find any. It tried with the main secular opposition party, the CHP, but the CHP wanted a four-year-long coalition and the AK Party wanted a short-term coalition," our correspondent added.

Davutoglu held coalition talks with both the second-placed Republican People's Party (CHP) and third-placed Nationalist Movement Party (MHP) but failed to broker a deal with either.

According to the constitution, the AK Party will be able to continue as a minority government until elections if a majority in parliament votes in favour of holding early polls.

OPINION: Turkey's AKP - Sailing into unchartered waters

If however Erdogan uses his right to call the polls himself, a so-called election government will be formed until the polls, consisting of members from all four parties represented in parliament.

It would be the first time in Turkey's political history that the largest party has failed to form a coalition and repeat elections need to be held.

The AK Party prides itself on providing Turkey with almost 13 years of stable one-party rule after chaotic coalitions and coups.

The NATO member has not seen this level of political uncertainty since the fragile coalition governments of the 1990s - turmoil it could do without as it takes on a frontline role in the US-led campaign against the Islamic State of Iraq and the Levant (ISIL) in Syria and battles Kurdish groups at home and in Iraq.