Turkey on Tuesday unblocked access to Twitter and YouTube after the companies removed contents that the government considered offensive.
The government blocked the sites after prosecutors asked for the move, saying photos of a prosecutor who was held hostage on Friday by two leftist militants were circulated online.
It said that the prosecutor and the two militants were killed after an eight-hour drama at a courthouse.
It added that the prosecutor was investigating the case of a boy allegedly killed by police during anti-government protests and the militants were angered by slow progress.
A media report indicated that a court had issued an order allowing the authorities to shut down websites that spread a photo of the prosecutor held hostage.
Twitter and YouTube were also blocked in 2014 in Turkey ahead of local elections, though the bans were later overturned by a court.
Turkey heads to parliamentary elections in June.