Oracle has lost a decade-long copyright battle against Google over its use of Oracle Java application programming interfaces (APIs) in the search engine giant’s Android operating system.

In a landmark ruling the US Supreme Court said that Google’s use of Oracle’s Java API counted as “fair use”. It means that Google is free to continue using Java APIs in Android devices and avoid paying multi-billion-dollar damages.

For the broader software industry, it means developers can continue using APIs for their projects – provided it falls under fair use.

Commentators had feared a victory for Oracle would lead to a surge in API copyright cases that could have stifled innovation in the software development industry.

The Supreme Court’s 6-2 decision ruled that “Google’s copying of the API to reimplement a user interface, taking only what was needed to allow users to put their accrued talents to work in a new and transformative program, constituted a fair use of that material”.

In his written opinion Justice Stephen Breyer said that if Oracle were able to enforce its copyright in the case it would “risk harm to the public”.

Dorian Daley, Oracle’s general counsel and executive vice president, said in a statement that Google “stole Java and spent a decade litigating as only a monopolist can.”

Ken Walker, Google’s senior vice president for global affairs, said the decision was a “big win for innovation, interoperability and computing.” The victory will come as welcome relief for Google. According to analysts at GlobalData, the company is “exposed to various lawsuits and litigations as part of its business and also attributed to regulatory probes in various regions in which Google operates.”

Oracle, which provides enterprise software and hardware, brought the case against Google in 2010 in a San Francisco federal court. The company claimed that Google illegally copied 37 APIs comprising approximately 11,500 lines of Java code. Java, a set of software specifications developed by Sun Microsystems, was acquired by Oracle in 2009 for $5.6bn.

The Supreme Court overturned a decision by a lower court in Oracle’s favour. Google subsequently appealed this in 2018.

Oracle had been seeking more than $8bn in damages. But given that Android devices account for around 70% of the global smartphone market, some estimates put the potential cost at $20bn to $30bn.

On the same day as the Supreme Court’s final verdict, Alphabet announced it was moving its internal financial operations from Oracle to SAP software in an apparent souring of relations between the two tech giants.