A Dutch website infringed copyright by posting links to copyright-infringing material, Europe’s top court has ruled.

Thursday’s ruling by the Court of Justice of the European Union (CJEU) will be music to the ears of rights holders who are frustrated at the existence of sites that provides lists of links to pirated music and films but that do not host such material themselves.

It could also have major implications for search engines such as Google goog if they link to copyright-infringing services despite having been asked not to do so.

Get Data Sheet, Fortune’s technology newsletter.

This particular case involved a website called GeenStijl (“No Style”) that repeatedly posted links to Playboy pictures of a Dutch TV presenter called Britt Dekker, even after Playboy’s Dutch publisher at the time told it to stop.

The ruling marks a rare occasion on which the court went against the advice of its advocate general, the court’s top advisor. (Another example would be the infamous Google Spain ruling that extended the so-called “right to be forgotten” to search engines.)

Advocate-general Melchior Wathelet recommended back in April that it should be irrelevant whether or not a site posting links to copyright-infringing material is doing so deliberately. If that isn’t the case, he warned, the everyday functioning of the Internet would be at risk—regular people can’t be expected to check whether the stuff they’re linking to was legally published or not.

In a statement on Thursday, the CJEU said publishing a link was a “communication to the public”—an act that requires clearance from the copyright-holder—when the person doing the posting knows that the link is to copyright-infringing material, or is trying to make money by posting the link.

“In the present case it is undisputed that GS Media [GeenStijl’s publisher] provided the hyperlinks to the files containing the photos for profit and that Sanoma [Playboy’s Dutch publisher] had not authorized the publication of those photos on the Internet,” the CJEU’s statement read.

“It appears from the facts, as stated in the Hoge Raad’s [Dutch high court’s] request for a preliminary ruling, that GS Media was aware of the illegal nature of that publication and that it cannot, therefore, rebut the presumption that it posted those links in full knowledge of the illegal nature of that publication. Subject to the checks to be made by the Hoge Raad, by posting those links, GS Media therefore effected a ‘communication to the public’.”

For more on copyright, watch our video.

The court said it accepted that hyperlinks were integral to the Internet and its benefits for free information and expression, and that regular Internet users may find it difficult to check whether they’re posting links to authorized or unauthorized material.

“In contrast, where it is established that such a person knew or ought to have known that the hyperlink he posted provides access to a work illegally published, for example owing to the fact that he was notified thereof by the copyright holders, the provision of that link constitutes a ‘communication to the public’,” the CJEU said.

“The same applies if that link allows users to circumvent the restrictive measures taken by the site where the protected work is posted in order to restrict the public’s access to its own subscribers…Furthermore, when hyperlinks are posted for profit, it may be expected that the person who posted such a link should carry out the checks necessary to ensure that the work concerned is not illegally published.”

Joel Vertes, a partner at the intellectual property practice of law firm Olswang, said the decision would be a relief to social media users as it means they won’t be liable for linking out to copyrighted content.

“However, for Internet businesses who link to third party content for profit, the decision raises significant new questions about their liability if the content turns out to be infringing,” Vertes said in an emailed statement. “The battleground will now be on what it means to be ‘posting hyperlinks for profit’? Does that mean profiting from the individual link, or profiting from the website as a whole (e.g. advertising)?”