Facebook has blocked some content in Turkey after Turkish authorities said the material was illegal because it was insulting to the Prophet Muhammad.

Facebook took the steps after receiving a valid legal request via court order late Sunday evening, a source at the company said. The content, which appeared on one page on the site, is no longer visible in Turkey. The order was given by the Golbasi Duty Magistrate Court, south of the capital of Ankara.

Facebook’s move to block the content speaks to the balance the company tries to reach in honoring free speech and also legal requests from governments. In this instance, the company’s decision comes after the shooting at the offices of the French satirical newspaper Charlie Hebdo, which is known for its cartoons of the Prophet Muhammad, and of other secular figures.

After the attack, Facebook CEO Mark Zuckerberg aligned himself with people advocating for freedom of speech, writing in a post on Facebook that he was committed to building a service “where you can speak freely without fear of violence.” His comments were criticized by some who said that Facebook adopts arbitrary rules about what people can post and what they can’t.

In the first half of 2014, Facebook blocked or restricted access to thousands of pieces of content, with most of the restrictions occurring in India (4,960), Pakistan (1,773), and Turkey (1,893), according to Facebook’s latest transparency report.

Turkey has in the past blocked other sites outright such as Twitter and YouTube. In 2014 the country restricted access to Twitter after government documents and recordings were leaked on the site.

To comment on this article and other PCWorld content, visit our Facebook page or our Twitter feed.