The US Supreme Court on Monday handed Google a major win in a long-running copyright battle with Oracle, ruling that the use of the Java programming language for the Android mobile operating system was "fair use."
The 6-2 ruling had been closely watched as a key test of copyright in the digital era, and allows Google to avoid paying out billions to its technology rival.
Justice Stephen Breyer wrote in the 39-page majority opinion that even if Google used copyrightable material, "the copying here at issue nonetheless constituted a fair use. Hence, Google's copying did not violate the copyright law."
The case revolved around whether copyright protection should be extended to application software interfaces (APIs), the bits of code that allow programs and apps to work together, and if so, whether Google's implementation was a "fair use" of copyrighted material.
The case drew interest across the spectrum of technology firms and creative industries, and heated debate on how much copyright protection should be afforded to bits of computer code.
Two separate jury trials ended with a determination that Google's "software interface" did not unfairly use Java code, saving the internet giant from a possible multibillion-dollar verdict.
But an appeals court in 2018 disagreed, saying the software interface is entitled to copyright protection, prompting Google to take the case to the highest US court.
Oracle, which in 2010 obtained the rights to Java when it acquired Sun Microsystems -- which had supported Google's use of Java for Android -- sought $9 billion in damages in its original complaint.
Google and many Silicon Valley allies have argued that extending copyright protection to APIs would threaten innovation in the fast-evolving digital world.
According to Google, a win for Oracle would "upend the longstanding expectation of software developers that they are free to use existing computer software interfaces to build new programs."
Others said Google would walk away with "intellectual property theft" in a court victory, arguing that it would make it hard to protect any digital property from Chinese misappropriation.
In a dissent, Justice Clarence Thomas, joined by Justice Samuel Alito, wrote that the court should have taken a narrower view of copyright in view of Google's copying of 11,500 lines of code.
"The court wrongly sidesteps the principal question that we were asked to answer: Is declaring code protected by copyright? I would hold that it is. Computer code occupies a unique space in intellectual property," Thomas wrote.
Breyer wrote that new technologies call for a broader view.
"The fact that computer programs are primarily functional makes it difficult to apply traditional copyright concepts in that technological world."
Breyer wrote that Google "reimplemented a user interface, taking only what was needed to allow users to put their accrued talents to work in a new and transformative program."
Law professor Steven Vladeck of the University of Texas said on Twitter the ruling was "a win for Google, but the big issue got punted" because the justices failed to decide on whether this type of software code may be copyrighted.
Boston University law professor Tiffany Li meanwhile called the decision a "huge win for fair use and people who understand how coding works!"