The ECJ has said that it is up to each country to decide how to balance the rights of the copyright holders to protect their intellectual property and the rights of internet users to protect their privacy.
A Spanish music rights-holder group had attempted to have the court force telecoms firm Telefónica to disclose subscriber details, but the court said that Spanish law can be consistent with EU law whether or not it obliges the disclosure of personal data in civil proceedings.
Initially the rights-holder group, Promusicae, won its case, but Telefónica appealed, saying that Spanish law only allowed for the disclosure of names and addresses of specific users in criminal cases or those involving national security and not in civil proceedings.
When Promusicae claimed that Spanish law had to be interpreted in accordance with EU laws such as the Copyright Directive, E-Commerce Directive and Privacy and Electronic Communications Directive, the court asked for the guidance of the ECJ.
It asked was it permissible for national laws to protect the privacy of internet users in civil cases. The ECJ said it was.
"[The Directives] do not require the Member States to lay down, in a situation such as that in the main proceedings, an obligation to communicate personal data in order to ensure effective protection of copyright in the context of civil proceedings," said the Court.
It did say, though, that there were some basic rights involved in the case, and there was a fundamental clash between one person's right to privacy and another's right to protect their intellectual property.
The Directives give countries some flexibility in how they are fixed into national laws. "As to those directives, their provisions are relatively general, since they have to be applied to a large number of different situations which may arise in any of the Member States," said the ruling.
"They therefore logically include rules which leave the Member States with the necessary discretion to define transposition measures which may be adapted to the various situations possible."
The court, then, ordered EU countries to frame their laws to take account of the various rights enshrined in the Directives. "Community law requires that, when transposing those directives, the Member States take care to rely on an interpretation of them which allows a fair balance to be struck between the various fundamental rights protected by the Community legal order," said the ruling.
"When implementing the measures transposing those directives the authorities and courts of the Member States must not only interpret their national law in a manner consistent with those directives but also make sure that they do not rely on an interpretation of them which would be in conflict with those fundamental rights or with the other general principles of Community law, such as the principle of proportionality," it said.
The Court said that it was acceptable for national laws to allow for the forcing of disclosure in civil proceedings, and acceptable for them not do force disclosure.
In the UK, and most European countries, copyright infringement is only criminal on a commercial scale. But in the UK a precedent set in a case involving Norwich Pharmacal means that disclosure can happen in civil cases.
Intellectual property specialist Iain Connor, a partner with Pinsent Masons, the law firm behind OUT-LAW.COM, said the ruling could be bad news for ISPs in the UK.
"You could potentially get people who want to host material effectively forum shopping and going to ISPs in places where disclosure would not be ordered," he said. "Equally you could get ISPs choosing to relocate their businesses to countries where disclosure would not be ordered."
"But in terms of the rationale for the ruling, in some ways it's actually just preserving the right of member states to have their own court procedures and in the UK the court procedure is such that disclosure would almost certainly be ordered," said Connor. "That potentially puts ISPs in the UK at a commercial disadvantage to those in Spain on the basis of this ruling."