The Court of Justice of the European Union’s (CJEU) landmark decision means any individual country in the EU can restrict global access to the offending material.
Facebook said the ruling raises “critical questions around freedom of expression and the role that internet companies should play in monitoring, interpreting and removing speech that might be illegal in any particular country”.
It comes after Austrian politician Eva Glawischnig-Piesczek sought an order for Facebook to remove a comment published by another user that she deemed harmful to her reputation, after Austrian courts ruled in her favour.
The defamatory comments could be accessed by any Facebook user and “equivalent content” was posted by others.
The CJEU said in a statement: “EU law does not preclude a host provider such as Facebook from being ordered to remove identical and, in certain circumstances, equivalent comments previously declared to be illegal.
“In addition EU law does not preclude such an injunction from producing effects worldwide, within the framework of the relevant international law which it is for Member States to take into account.”
The move will force tech giants to take even more responsibility for content posted on their platforms, at a time of increased concern around online harm and trolls.
However, the decision exemplifies the difficulty in governing a borderless internet and the likely ripples felt beyond the EU from the judgment.
Last week, the CJEU decided that the “right to be forgotten” should remain in the EU only, after it recognised countries outside the EU “have a different approach” and that the balance between the right to privacy and the protection of personal data against freedom of information of internet users “is likely to vary significantly around the world”.
A Facebook spokeswoman said in reaction to Thursday’s ruling: “At Facebook, we already have Community Standards which outline what people can and cannot share on our platform, and we have a process in place to restrict content if and when it violates local laws.
“This ruling goes much further. It undermines the long-standing principle that one country does not have the right to impose its laws on speech on another country.
“It also opens the door to obligations being imposed on internet companies to proactively monitor content and then interpret if it is ‘equivalent’ to content that has been found to be illegal.
“In order to get this right, national courts will have to set out very clear definitions on what ‘identical’ and ‘equivalent’ means in practice.
“We hope the courts take a proportionate and measured approach, to avoid having a chilling effect on freedom of expression.”
Rights groups have also expressed concern, with Article 19 saying it will have “major implications for online freedom of expression around the world”.
Thomas Hughes, executive director of Article 19, said: “Compelling social media platforms like Facebook to automatically remove posts regardless of their context will infringe our right to free speech and restrict the information we see online.
“The judgment does not take into account the limitations of technology when it comes to automated filters.
“The ruling also means that a court in one EU member state will be able to order the removal of social media posts in other countries, even if they are not considered unlawful there.
“This would set a dangerous precedent where the courts of one country can control what internet users in another country can see. This could be open to abuse, particularly by regimes with weak human rights records.”