A view of Google’s Mountain View, Calif., campus. The company’s copying of some Java API code for its Android operating system was fair use, the Supreme Court decided on Monday.

The Supreme court ruled for Alphabet Inc’s Google in a multi billion dollar battle with Oracle Corp. over elements of Google’s Android smartphone-operating system, a decision that could weaken software copyright protections but grant developers more breathing room in order to build on each other’s products.

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

Oracle, which obtained the Java technology when it acquired Sun Microsystems Inc. in 2010, accused Google of illegally copying over 11,000 lines of Java API code to develop Android, which runs more than two billion mobile devices globally.