Turkish Prime Minister Recep Tayyip Erdogan
Turkish Prime Minister Recep Tayyip ErdoganReuters

Turkey’s Prime Minister confirmed on Sunday that he was the one who gave the orders to shut down Twitter in the country, reports The Associated Press (AP).

Speaking at a campaign event in Istanbul ahead of March 30 municipal elections, Prime Minister Recep Tayyip Erdogan said he had given the order because Twitter was not obeying Turkey's laws.

Previously, the Turkish government said that the telecommunications authority had blocked Twitter on court orders. However, the move came shortly after Erdogan threatened to "rip out the roots" of the website.

Erdogan said Twitter was applying double standards, shutting down accounts when the U.S. or the U.K demand it, but defending freedom when Turkey, Ukraine or Egypt have concerns.

"This isn't a banana republic!" he declared, according to AP.

At the same rally, Erdogan launched a blistering attack on social media websites, according to the AFP news agency.

"I cannot understand how sensible people still defend Facebook, YouTube and Twitter. They run all kinds of lies," he declared.

"Twitter, Facebook and YouTube have to respect the Turkish republic's laws," he added.

Just two weeks ago, Erdogan threatened that his government could ban websites such as YouTube and Facebook after a raft of online leaks added momentum to a spiraling corruption scandal.

Recordings that were leaked include an apparent discussion between Erdogan and his son about hiding money, as well as others in which he appears to be interfering in business deals, court cases and media coverage.

Some of the most damaging information has come from a Twitter account under the name Haramzadeler ("Sons of Thieves"), which appears to have access to a huge trove of secret documents and police wiretaps linked to the investigation. Erdogan has dismissed most of the recordings as "vile" fakes concocted by his rivals.

"If the U.S. president's phone recordings go online, will Twitter, YouTube and Facebook say it is freedom?" he said Sunday, according to AFP.

Erdogan, who has been in power for 11 years, said he was obliged to act to counter "any attack threatening my country's security."

"If Twitter acts honestly, we are ready to support it. If YouTube acts honestly, we are ready to give every support. If Facebook gives up immoralities... it will receive support," he added.

Many Turkish Twitter users were able to get on the site despite the ban, using the Google DNS service. However, on Saturday it was reported that Turkey had banned that service as well.

Turkey’s ban of Twitter was met with harsh criticism by the United States on Friday, with State Department spokeswoman Jen Psaki saying the order to prevent Turks from accessing the site was "contrary to Turkey's own expressed desire to be a model of democracy."

The White House also condemned the ban, with spokesman Jay Carney telling reporters, "The United States is deeply concerned that the Turkish government has blocked its citizens access to basic communication tools.”