The European Court of Justice has ruled that reselling software, even when downloaded from the internet, is legal.

The verdict comes as a blow to web giant Oracle, who bought the case against German reselling firm UsedSoft, ZDNet reported.

"Where the copyright holder makes available to his customer a copy — tangible or intangible — and at the same time concludes, in return [for] payment of a fee, a licence agreement granting the customer the right to use that copy for an unlimited period, that rightholder sells the copy to the customer and thus exhausts his exclusive distribution right. Such a transaction involves a transfer of the right of ownership of the copy," the court said in a statement.

"Therefore, even if the licence agreement prohibits a further transfer, the rightholder can no longer oppose the resale of that copy," it elaborated.

The court also ruled that the first owner should erase the software from their computer when it has been resold.