Turkish Prime Minister Recep Tayyip Erdogan rejected accusations of intolerance from critics following his decision to ban Twitter.
Erdogan, who leads the ruling AK Party, was speaking at a mass rally on Sunday ahead of local elections on March 30.
He told the crowd: "I cannot understand how sensible people still defend Facebook, YouTube and Twitter. They run all kinds of lies.
"I am obliged to take measures in the face of any attack threatening my country's security, even if the world stands up against us.
"Twitter, Facebook and YouTube have to respect the Turkish Republic's laws. Turkey is not a banana republic," AFP news agency reported him as saying.
Erdogan said Twitter complied with national laws in the US and China, but not when it came to countries such as Egypt and Turkey.
He also used his address, in the city of Izmit, to announce that Turkish F-16 planes had shot down a Syrian aircraft that had crossed into Turkish airspace.
Estimates for the number of people at Sunday's rally varied from several hundred thousand to two million.
On Saturday, the government criticised Twitter, saying the US-based social media company had failed to abide by hundreds of court orders to remove content deemed illegal.
The social media ban has been circumvented and mocked, but Erdogan has remained resolute in the face of opposition from the public and even the Turkish president, Abdullah Gul, who earlier on Sunday had described the ban as "an unpleasant situation for such a developed country as Turkey".
Content on this website is for general information purposes only.
Your comments are provided by your own free will and you take sole responsibility for any direct or indirect
liability. You hereby provide us with an irrevocable, unlimited, and global license for no consideration to
use, reuse, delete or publish comments, in accordance with Community
Rules & Guidelines and Terms and