Facebook has blocked a page after a Turkish court ruled it was insulting to the prophet Muhammad.

The order was made by a Golbasi duty magistrate court following a request by the prosecutor Harun Ceylan, who was investigating a number of pages on the social media network.

The court ruled that Facebook would be blocked in Turkey if it did not comply with the ruling, the semi-official Anadolu news agency reported.

The social network is estimated to have about 40 million users in the country.

Facebook declined to comment directly. It has a policy of complying with the laws of the countries in which it operates even if such action infringes free speech.

For the six months to June 2014, Facebook said it restricted access to 1,893 pieces of content that were “primarily reported by the Turkish Information and Communication Technologies Authority and Turkish law enforcement officials under local laws, especially law 5651, which covers a range of offenses including defamation of Ataturk and personal rights violation”.

This month a court in Turkey’s southeastern Diyarbakir province ordered a block on accessing web pages showing the cover of the French satirical magazine Charlie Hebdo. It depicted a cartoon of Muhammad in the wake of the attacks on the publication’s Paris offices that left 12 people dead.

It was unclear whether that order had been fully complied with.

The court orders are the latest moves to crack down on material regarded as offending religious sensibilities in the largely Muslim nation, where the government of president Tayyip Erdogan is regarded as pushing a pro-Islamist agenda.

This month, prosecutors opened an inquiry into a newspaper that reprinted parts of the latest issue of Charlie Hebdo.

In March 2014 Turkey restricted access to Twitter hours after Erdogan - then the prime minister - threatened to “root out” the social media network where wiretapped recordings had been leaked, damaging the government’s reputation ahead of local elections.

However, many users soon circumvented the ban by using text messaging services or disguising the location of their computers to continue posting messages on the site.