The 6-2 ruling, which overturns a victory for Oracle, marks a climax to a decade old case that divided Silicon Valley and promised to reshape the rules for the software industry.
For those who came in very late, Oracle’s lawsuit accused Google of plagiarising its Java software by copying 11,330 lines of computer code, as well as the way it is organised, to create Android and reap billions of dollars in revenue.
Oracle was seeking as much as $9 billion but some observers thought it would end up getting about $30 billion by the time the dust settled.
Google has said it did not copy a computer program but rather used elements of Java’s software code needed to operate a computer program or platform. Federal copyright law does not protect mere “methods of operation”. The companies also disputed whether Google made fair use of Oracle’s software code, making it permissible under the 1976 Copyright Act.
The Supremes said Google engaged in legitimate "fair use" when it put key aspects of Oracle's Java programming language in the Android operating system.
Writing for the court, Justice Stephen Breyer said Google used "only what was needed to allow users to put their accrued talents to work in a new and transformative program".
Each side contended the other's position would undercut innovation. Oracle said that without strong copyright protection, companies would have less incentive to invest the large sums needed to create groundbreaking products. Google said Oracle's approach would discourage the development of new software that builds on legacy products.