Turkish Prime Minister Tayyip Erdogan's ruling AK Party won a parliamentary election with nearly 50% of the vote, but failed to win enough seats to call a referendum on a planned new constitution.

The AK will be forced to compromise with other parties to press on with plans to replace the existing charter, written almost 30 years ago during a period of military rule.

‘The people gave us a message to build the new constitution through consensus and negotiation,’ Prime Minister Tayyip Erdogan said in a victory speech to supporters from the balcony of the AK Party headquarters in Ankara.

‘We will discuss the new constitution with opposition parties.’

Preliminary results based on 99.7% of the vote show AK winning 49.9%, or 325 seats, just below the 330 required for a plebiscite and less than the 331 of the 550 seats it had in the last parliament.

The centre-left Republican People's Party (CHP) took 25.9% of the vote while the far right Nationalist Movement Party (MHP) got 13%, exceeding the 10% threshold required for parties to enter parliament.

The election board will ratify official results in coming days.