The US Court of Appeals for the Federal Circuit said Google's use of Oracle's Java development platform to create the Android operating system was not protected under the fair-use provision of copyright law, reversing a 2016 jury verdict.
The court sent the case back to a US judge in San Francisco for a trial to determine how much compensation Google owes Oracle.
Oracle had previously sought $9 billion (roughly Rs. 58,000 crores) in damages.
"We are disappointed the court reversed the jury finding that Java is open and free for everyone," Google spokesman Patrick Lenihan said in a statement. "This type of ruling will make apps and online services more expensive for users."
"The Federal Circuit's opinion upholds fundamental principles of copyright law and makes clear that Google violated the law," said Oracle general counsel Dorian Daley in a statement. "This decision protects creators and consumers from the unlawful abuse of their rights."
The closely watched case, which dates to 2010, involves how much copyright protection should extend to the Java programming language, which Google used to design the Android operating system that runs most of the world's smartphones.
Oracle is seeking royalties for Google's use of some of the Java language, while Google argues it should be able to use Java without paying a fee.
Annemarie Bridy, a professor of intellectual property at the University of Idaho College of Law, said in an interview the ruling could stifle software innovation by opening up developers to potential liability for copyright infringement.
"This is a ruling that could have a significant chilling effect on software developers," she said, noting that they rely on computer code like Oracle's to make apps communicate with each other.
Matthew Sarboraria, a vice president and associate general counsel at Oracle, said in an interview that such concerns were overblown.
Sarboraria said the ruling bolsters copyright protection in the software industry, ensuring that programmers have incentives to innovate.
"The sky is not falling," he said. "The sky is firmly in place."
© Thomson Reuters 2018