Fears are growing that Facebook and YouTube could be banned in Turkey as tensions rise ahead of key local elections scheduled to be held in late March.

Prime Minister Tayyip Erdogan, head of the ruling Islamist-rooted AK Party, says the social media sites are being used by political opponents to post allegedly fabricated recordings exposing corruption in his inner circle.

"We will take the necessary steps in the strongest way...because these people...encourage every kind of immorality and espionage for their own ends," Erdogan told Turkish television.

"We are always proud of the reforms we have made regarding the broadening of freedoms," he said.

The president has also been criticized in the past year by liberal-leaning Turks for remaining silent over some government measures they see as curtailing basic freedoms.

There has been no immediate reaction from Facebook or YouTube to the potential threats to their services in the country. Turkey has a population of 77 million and ranks among the world's top 15 for Facebook use, with around 34 million active users every month.

YouTube has already felt the wrath of Turkey's government: The video service was banned for more than two years, until 2010, after users posted videos deemed insulting to the republic's founder, Mustafa Kemal Ataturk.