Google has won a comprehensive victory against high-stakes claims by Oracle it
unlawfully copied key parts of software to create its bestselling Android
smartphone operating system.

A US federal judge ruled on Thursday that the software code at the heart of the case – 37 “APIs”, which allow apps to interact with operating systems – is not subject to copyright, leaving Oracle’s multibillion-dollar claim effectively defeated.

Earlier in the case Oracle had won a limited victory when they jury decided that Google had copied some code, although they did not reach a verdict on whether the copying was allowed under the “fair use” provisions of American copyright law. It was the only aspect of the complex case that went against Google.

But California US District Court Judge William Alsup’s ruling means even that crumb of comfort to Oracle has been snatched away.

"When there is only one way to express an idea or function, then everyone is free to do so and no one can monopolize that expression," he said in his ruling.

"So long as the specific code used to implement a method is different, anyone is free under the Copyright Act to write his or her own code to carry out exactly the same function."

The big money case, part of the ongoing “patent wars” in the smartphone industry, has been watched intently in Silicon Valley as a test of whether copyright protection would be extended to APIs.

Android, the world's bestselling smartphone operating system, used in handsets such as the Samsung Galaxy SIII, relies on Java, a programming language acquired by Oracle when it bought Sun Microsystems. Oracle claimed Google should have paid for a licence to use the APIs. The web firm countered that it had not copied Oracle’s code but developed its own software to perform the same functions.

Oracle, which had hoped the court would impose a levy on every Android smartphone sold, said it would appeal against the latest blow to its claims.

“This ruling, if permitted to stand, would undermine the protection for innovation and invention in the United States," said spokeswoman Deborah Hellinger.

“Oracle is committed to the protection of Java as both a valuable development platform and a valuable intellectual property asset. It will vigorously pursue an appeal of this decision in order to maintain that protection.”

Judge Alsup said his ruling does not mean nobody has to pay Oracle to use Java APIs, but that the way Google did was lawful.

“It holds on the specific facts of this case, the particular elements replicated by Google were free for all to use,” he said.

Google celebrated what observers said ammounted to a rout of its attacker.

“The court's decision upholds the principle that open and interoperable computer languages form an essential basis for software development,” a spokesman said.

“It's a good day for collaboration and innovation.”

Meanwhile, however, a claim by Google that Nokia and Microsoft had unlawfully colluded with a so-called “patent troll” firm to attack Android was dismissed by US antitrust authorities.