Turkey’s under-fire prime minister has warned his government could ban Facebook and YouTube.

Tayyip Erdogan, speaking to Turkish broadcaster ATV, said the websites ‘encourage every kind of immorality and espionage for their own ends’.

In a recording posted to YouTube on Thursday, Erdogan is purportedly heard berating a newspaper owner over the telephone about an article and suggesting the journalists involved should be sacked.

It comes amid a major probe into corruption of the PM’s allies. Erdogan responded by sacking hundreds of police officers.

Erdogan, speaking ahead of key elections later this month for his Islamist-rooted AK Party, said: “We are determined on this subject. We will not leave this nation at the mercy of YouTube and Facebook.

“We will take the necessary steps in the strongest way,” he said, adding that these would come after municipal elections set for March 30.

Asked if a ban on these sites could be included among the planned measures, he said: “Included, because these people or institutions encourage every kind of immorality and espionage for their own ends.”

There was no immediate reaction from Facebook or YouTube.

Turkey banned YouTube for more than two years until 2010 after users posted videos the government deemed insulting to the republic’s founder, Mustafa Kemal Ataturk.

Turkey’s communications minister appeared to defend the putative bans.

“We see insults against a country’s prime minister and president, the uploading of illegal videos – and we’re supposed to be at ease with this? … Whatever is a crime in the real world is also a crime in the virtual world,” the Dogan news agency quoted Lutfu Elvan as saying on Friday.

Erdogan says the postings are part of a campaign to discredit him and wreck his government, which has presided over more than a decade of strong economic growth and rising living standards in NATO-member Turkey.

He says fragments of tapped conversations have been fitted together in a ‘montage’ giving a false and misleading impression of their content.