Facebook can be ordered to police and remove illegal content worldwide, Europe’s top court said on Thursday, in a landmark ruling that rights advocates say could allow authoritarian regimes to silence critics.

The ruling came just a week after the same court told Google that it does not have to apply Europe’s “right to be forgotten” law globally, garnering praise from freedom of speech advocates as courts try to figure out just how much responsibility for content platforms should have.

The judgment by the Luxembourg-based Court of Justice of the European Union said Facebook may have to comply with requests to take down content globally under certain conditions.

“EU law does not preclude a host provider like Facebook from being ordered to remove identical and, in certain circumstances, equivalent comments previously declared to be illegal,” the court said in a statement.

“In addition, EU law does not preclude such an injunction from producing effects worldwide, within the framework of the relevant international law.”

Facebook slammed the ruling, saying that it was not the role of social platforms to monitor, interpret and remove speech that may be illegal in any particular country.

“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,” the company said.

“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.”

UK rights group Article 19 backed Facebook, saying that it could impact online freedom of expression worldwide.

“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,” said its executive director, Thomas Hughes.

He said it could lead to cases where a court in one country demands the removal of social media posts in another country even if these are not illegal in that country.

“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,” he said.

The European Commission said the ruling was limited to court orders and doesn’t concern any other forms of notice by users alleging that certain content is illegal.

Facebook found itself in the dock after Eva Glawisching-Piesczek, chairwoman of the Greens parliamentary group in Austria, sued the company in an Austrian court, asking that it delete a comment posted by a user that she said undermined her honor, and also to remove identical claims.