Europe's highest court ruled on Tuesday that the trading of "used" software licenses is legal and that the author of such software cannot oppose any resale.

The exclusive right of distribution of a copy of a computer program covered by such a licence is exhausted on its first sale, said the European Court of Justice (ECJ). This applies to downloaded software as well as that bought on CD or DVD. This ruling sets a precedent for trading of used software licenses throughout the European Union and could potentially impact ebooks and computer games as well.

The court also ruled that any patches or upgrades made to the software through a service agreement also form part of the used software that can be sold on. However it said that the reseller must make the copy downloaded onto his own computer "unusable" at the time of resale.

The German Federal Court of Justice referred the question to the ECJ following a legal battle between Oracle and UsedSoft, a company that buys and sells used software. Oracle launched the case after UsedSoft offered "pre-used" Oracle software licenses online in October 2005.

Oracle customers can download a copy of the program directly onto their computer from Oracle's website. The user right for such a program, which is granted by a license agreement, includes the right to store a copy of the program permanently on a server and to allow up to 25 users to access it by downloading it to the main memory of their workstation computers.

In a small victory for Oracle, the ECJ ruling prevents resellers from breaking up a license and selling only part of it if they have purchased licenses for more users than they need.

UsedSoft customers download the resold software directly from Oracle's website after acquiring a 'used' license. Oracle argued that the principle of exhaustion does not apply to user licenses for computer programs downloaded from the Internet. However the ECJ firmly rejected this argument.

The German Regional Court originally ruled in favor of Oracle, but following UsedSoft's appeal, the federal court decided to refer the matter to the ECJ. The final judgement must still be made by the German federal court, but given the ECJ ruling will form a large basis of the decision, Oracle looks likely to lose the case.

Follow Jennifer on Twitter at @BrusselsGeek or email tips and comments to jennifer_baker@idg.com.