Istanbul - Turkey on Monday blocked access to Twitter, Facebook and YouTube over the publication of images of a Turkish prosecutor killed by leftist militants during a hostage standoff last week.
The sites were inaccessible for many users in Turkey, with the Hurriyet newspaper saying that service providers got an order from prosecutors to block Twitter, Facebook and YouTube.
The authorities set a deadline of four hours for Twitter, Facebook and YouTube to remove the content, but only Facebook complied with the deadline and access to the social network was restored accordingly.
Bulent Kent, the secretery general of Internet Service Providers Union (ESB), told Hurriyet that a prosecutor's order was issued to the union, but that the process was ongoing.
YouTube.com ran the text of a court ruling on its site saying an "administration measure" had been implemented by the country's telecommunications authority (TIB).
Hurriyet said the order blocked a total of 166 websites which published the images, including the three Internet giants.
Also read: Fake Facebook account of Lagos police boss uncovered
Publication of any material related to the hostage standoff amounted to "terrorist propaganda" inciting people to "hatred and violence" and disturbing the public order, the court ruling read.
Prosecutor Mehmet Selim Kiraz and his two captors linked to the Marxist Revolutionary People's Liberation Party-Front (DHKP-C) were killed after a shootout at a courthouse in Istanbul on Tuesday.
The DHKP-C had published pictures showing one of the militants, his face concealed by a scarf with the group's red and yellow insignia, holding a gun to the hostage's head in the prosecutor's offices.
The images were circulated on social media while the siege was going on and were published by several Turkish newspapers as well as news websites.
A day after the standoff, Turkish prosecutors launched a probe into four newspapers for disseminating "terrorist propaganda" after they published the controversial images.
Turkey's presidential spokesman Ibrahim Kalin said on Monday that the bans were "to do with the publishing of the prosecutor's picture", describing showing them as "unacceptable".
"What happened in the aftermath is as sad as the incident itself... There is no such freedom anywhere in the world."
European Parliament member Marietje Schaake of the Netherlands took to Twitter to condemned the ban as "another disproportionate response restricting press freedom."
President Recep Tayyip Erdogan and the ruling Justice and Development Party (AKP) have been repeatedly criticised for using court orders to block critical websites, topping a Google table for content removal requests.
Last year the search engine also accused Turkey of intercepting its Internet domain, redirecting users to other sites.
The government blocked Twitter and YouTube in March 2014 after they were used to spread a torrent of audio recordings implicating Erdogan, then premier and his inner circle in an alleged corruption scandal.
Turkey's parliament last month approved legislation to tighten the government's control over the Internet by allowing it to block websites without prior judicial authorisation, sparking outrage both at home and abroad.
Erdogan has also made no secret of his disdain for social networks, comparing them to a "murderer's knife" and once famously vowing to "eradicate" Twitter.