By Brent Kendall

WASHINGTON -- The Supreme Court on Monday ruled for Alphabet Inc.'s Google in a multibillion-dollar copyright battle with Oracle Corp. over how it built its Android smartphone-operating system.

The court, in a 6-2 opinion by Justice Stephen Breyer, threw out a lower-court ruling for Oracle that said Google's Android infringed its copyrights on the Java software platform. The high court said Google's copying of some Java API code was fair use. APIs, or application programming interfaces, are prewritten packages of computer code that allow programs, websites or apps to talk to one another.

"Google's copying did not violate the copyright law," Justice Breyer wrote.

Oracle acquired the Java technology when it bought Sun Microsystems Inc. in 2010.

Oracle accused Google of illegally copying more than 11,000 lines of Java API code to develop Android, which runs more than two billion mobile devices world-wide.

Oracle previously sought as much as $9 billion in damages from Google.

"The Google platform just got bigger and market power greater. The barriers to entry higher and the ability to compete lower," Oracle said in a statement. "They stole Java and spent a decade litigating as only a monopolist can. This behavior is exactly why regulatory authorities around the world and in the United States are examining Google's business practices."

Kent Walker, Google's chief legal officer and senior vice president for global affairs, said the ruling "is a victory for consumers, interoperability, and computer science. The decision gives legal certainty to the next generation of developers whose new products and services will benefit consumers."

Write to Brent Kendall at brent.kendall@wsj.com

(END) Dow Jones Newswires

04-05-21 1156ET