A U.S. judge has ruled that the Java application programming interfaces used in Android are not protected by copyright, marking a defeat for Oracle in its high-stakes lawsuit against Google.

The ruling is a fairly narrow one, applying only to the 37 Java APIs that were at issue at trial. Still, it will be seen as a victory by many in the software industry, who feared that a ruling in favor of Oracle would stifle innovation in the software industry.

"This order does not hold that Java API packages are free for all to use without license," Judge William Alsup wrote in an order filed Thursday in U.S. District Court for the Northern District of California. "It does not hold that the structure, sequence and organization of all computer programs may be stolen. Rather, it holds on the specific facts of this case, the particular elements replicated by Google were free for all to use under the Copyright Act."

Oracle seems likely to appeal the judge's ruling to a higher court.

Oracle sued Google about two years ago, alleging its Android software infringed both patents and copyrights for Java that Oracle acquired when it bought Sun Microsystems in early 2010. Google was cleared of patent infringement by the jury, and the judge's ruling Thursday means it has now been cleared of copyright infringement as well.

James Niccolai covers data centers and general technology news for IDG News Service. Follow James on Twitter at @jniccolai. James's e-mail address is james_niccolai@idg.com