Turkey local polls
Turkish Prime Minister Tayyip Erdogan, accompanied by his wife Emine, greets his supporters at the AK Party headquarters in Ankara Reuters

Following his victory in the local election, Turkey's Prime Minister Recep Tayyip Erdogan has warned that his rivals will "pay the price" for trying to bring about his downfall.

With nearly 47% of the vote in his favour, Erdogan, who is leading the ruling Justice and Development Party, has said the election outcome is a blow to the "immoral, aimless politics" of his foes.

While the main opposition Republican People's Party has secured 28% of the vote, the Nationalist Movement Party has come third with 13%, according to preliminary results. Official results are expected shortly.

"Nobody should be upset. 77 million people should know that the new Turkey has won today. This is the wedding day of the new Turkey," said Erdogan.

The election took place amid spiralling corruption allegations and leaks against Erdogan's administration which recently banned YouTube and Twitter sparking widespread condemnation.

Fighting one of the worst crises in his 12-year rule, the polling was widely seen as a litmus test of Erdogan's ability to stay on in power.

Addressing a mass rally by party supporters in capital Ankara, he said: "The people have spoken: They said we are here. The montage politics have lost. The Status Quo has received a severe blow today. Dirty relations and tutelage have lost."

Commenting on the recent leaks on Syria, he said: "It is true, this people have met the traitor to the nation that deigned to listen to the foreign ministry. We will enter their den, and they will pay the price. How can you threaten our national security on Syria? Syria is currently in a state of war against us."