ISTANBUL—A Turkish court temporarily blocked access to Twitter and YouTube—and threatened to ban Google as well—for failing to remove content related to a deadly hostage crisis last week, marking the second time in a year that Turkey has blocked the social-media platforms.
The blackout came Monday after an Istanbul court ordered the U.S. companies, as well as Facebook Inc. and dozens of other local and foreign websites, to take down images, videos and voice recordings linked to the hostage crisis. It threatened a blockade for noncompliance.
By Monday evening, Turkish authorities restored access to both YouTube and Twitter after saying that the platforms had fulfilled the court’s demands. In a second decision issued late Monday, the court directed Google Inc., YouTube’s owner, to remove the content from its search engine, or else it would also be blocked. A person close to the company said Google was continuing to work to keep its services accessible to users.
Facebook was hit by a brief interruption in some parts of the country on Monday, but also came back online after complying with the court order. Facebook said it was appealing the order, and a person familiar with the matter said Twitter planned to follow suit.
The court’s decision stems from last week’s deadly standoff at an Istanbul courthouse between Turkish security forces and communist militants. After taking Prosecutor Mehmet Selim Kiraz hostage, the militants published photos of Mr. Kiraz on social media with a gun to his head and the Marxist-Leninist group’s yellow-starred red flags in the background.
The pictures of the prosecutor were widely distributed online and some newspapers printed them on their cover, prompting criticism from the government and prosecutors. Mr. Kiraz died of gunshot wounds sustained in the standoff. Istanbul’s chief prosecutor said an autopsy showed he had been shot by bullets fired at close range by the militants.
“These broadcasts have been shared as propaganda for the armed terrorist organization,” the court said in its decision, adding that their publication endangered public safety.
The court orders mark the latest effort in Turkey to censor content on the Internet and comes as opposition lawmakers and activists say the government is seeking to muzzle dissent before critical June parliamentary elections.
Social media has emerged as a key platform for Turkish critics to organize, share information, and mount publicity campaigns against the government. After protesters used the web to organize nationwide anti-government demonstrations in 2013, President Recep Tayyip Erdogan labeled Twitter “a menace to society” and promised to “root out” social media from Turkey.
The Ankara government has adopted a series of draconian Internet laws in the past year—most recently in March—allowing authorities to shutter websites for up to 48 hours without court orders to protect individual rights, national security and public order.
Ankara’s Western allies, led by the U.S. and the European Union—which Turkey seeks to join—have also criticized the country’s Internet laws, saying they amount to a crackdown on dissent.
“Turkey blocks social media all together, another disproportionate response restricting press freedom, free speech,” European Parliament Member Marietje Schaake said in a tweet after Monday’s ban.
Turkey’s clash with tech firms also is latest flashpoint in a broader conflict between governments and U.S. tech firms over how and where to draw the line between free speech and illegal content in an age when both teenagers and terrorists carry smartphones.
At stake is Silicon Valley firms’ ability to protect their users while expanding their businesses overseas amid increasing government requests for content removal and surveillance help online.
“If you’re social media, you’re both trying to do what’s right and keep your company going,” said Zeynep Tufekci, a professor at the University of North Carolina who studies the interaction of technology and society. “We’re trying to deal with this unruly thing that has become the public sphere.”
With terrorist organizations such as Islamic State using social media as recruiting tools, the issue has become a leading priority in Europe—home to the many of the foreign militants fighting wars in Syria and Iraq.
Technology firms say they remove content that is illegal or violates their own terms of service. But they also say they are wary of setting precedents that could oblige them to remove content that could stifle debate.
Government demands are mounting: Requests to remove content on Twitter tripled worldwide to 1,229 in 2014 from the previous year, with Turkey leading the charge. Removals of Facebook content at the request of governments increased in the second half of 2014 by 32% compared with the same period in 2013. After the January attacks in Paris, France flagged more than 25,000 pieces of terrorist content online for removal.
Many Turkish users skirted the ban on Monday, using virtual-private networks, or VPNs, that obscure the country of access to allow the use of the social-media platforms. Within an hour, the hashtag “Twitter is blocked in Turkey” started trending globally on the platform, surging past 100,000 mentions.
Twitter’s global public-policy team tweeted after Monday’s ban that the company was “working to restore access” in Turkey. After last year’s blackout, the micro-blogging site held a series of meetings with Turkish officials, agreeing to implement court decisions more efficiently.
In addition to social-media platforms, the court decision also targeted websites that printed photographs of Mr. Kiraz with one of his captors, including leading Turkish daily Hurriyet, the NTV news channel, opposition newspapers Cumhuriyet and Sozcu, as well as international news organizations, such as the U.K.’s The Independent.
“This is about the publication of the martyred prosecutor’s images on social media,” Turkish presidency spokesman Ibrahim Kalin said shortly after the ban went into effect Monday. “It is unacceptable for certain media organizations to publish these photos despite all the warnings, as if they were engaged in terrorism propaganda.”