The Luxembourg-based European Court of Justice (ECJ) ruled in a case involving two Belgian companies, music royalty collecting society SABAM and online social network Netlog.
SABAM asked a Belgian court in 2009 to order Netlog to stop its users illegally downloading songs from the society's portfolio. The Belgian judges sought advice from the Luxembourg court.
But the ECJ backed Netlog. "The owner of an online social network cannot be obliged to install a general filtering system, covering all its users, in order to prevent the unlawful use of musical and audio-visual work," the ECJ said in a statement.
"Such an injunction would result in a serious infringement of Netlog's freedom to conduct its business since it would require Netlog to install a complicated, costly, permanent computer system at its own expense," it said.
Judges also said forcing companies to install a filter to identify, analyse and process users' personal information might infringe their privacy and could result in the blocking of lawful content.
Telecoms and internet regulation consultant Innocenzo Genna told EurActiv that such a filter obligation was disproportionate because it would infringe the freedom of social networks to conduct business. He said businesses would be obliged to set up a complicated and expensive mechanism to protect third parties' rights, and jeopardise users' rights since their activities would be systematically monitored and affected without their consent.
"This decision is a fundamental for the development of the Single Digital Market in the European Union, because it gives greater legal certainty to Internet providers and ensures protection for the right to publish content without prior censorship," said Genna.
The obligations of internet-based services to police online piracy have sparked heated argument recently, as entertainment companies and publishers attempt to enforce controls.
Last month, US lawmakers sought to introduce anti-piracy legislation, but backed down after intense lobbying by Internet companies and concerns by the White House. The technology companies argued that this would violate speech and internet freedoms and be difficult to enforce.
In Europe, thousands of protestors have rallied against ACTA, an international anti-piracy agreement that some European countries have signed. The protestors fear ACTA might curb their freedom to download movies and music for free and encourage internet surveillance.
Social networking sites such as Facebook, Flickr, Twitter and Google's YouTube base their business models on the sharing of users' views and information, as does Netlog.
SABAM is one of 24 national collecting societies across the 27-country EU that collect royalty payments on behalf of authors, singers and performers.
In a separate case last year, the ECJ dismissed a bid by SABAM to get Scarlet, a unit of Belgian telecom operator Belgacom, to stop its users from illegal downloads of songs.