SAN FRANCISCO—Following a two-week trial, a federal jury concluded Thursday that Google's Android operating system does not infringe Oracle-owned copyrights because its re-implementation of 37 Java APIs is protected by "fair use." The verdict was reached after three days of deliberations.

"Ladies and gentlemen of the jury, listen to your verdict as it will stand recorded," said the court clerk, before polling each of the ten men and women on the jury.

There was only one question on the special verdict form, asking if Google's use of the Java APIs was a "fair use" under copyright law. The jury unanimously answered "yes," in Google's favor. The verdict ends the trial, which began earlier this month. If Oracle had won, the same jury would have gone into a "damages phase" to determine how much Google should pay. Because Google won, the trial is over.

"I salute you for your extreme hard work in this case," said US District Judge William Alsup, who has overseen the litigation since 2010. "With the thanks of your United States District Court, you are now discharged. I would like to come in the jury room and shake each of your hands individually."

Four of the ten jurors declined to comment to reporters gathered in the hallway. The other six went out through a back exit.

"We're grateful for the jury's verdict," said Google lead lawyer Robert Van Nest before getting into the elevator with Google's in-house lawyers. "That's it." Oracle attorneys had no comment.

Google said in a statement that its victory was good for everybody. "Today's verdict that Android makes fair use of Java APIs represents a win for the Android ecosystem, for the Java programming community, and for software developers who rely on open and free programming languages to build innovative consumer products," a Google spokesperson said via e-mail.

Oracle, however, vowed to appeal.

"We strongly believe that Google developed Android by illegally copying core Java technology to rush into the mobile device market. Oracle brought this lawsuit to put a stop to Google's illegal behavior. We believe there are numerous grounds for appeal and we plan to bring this case back to the Federal Circuit on appeal," Dorian Daley, Oracle's general counsel, said in a statement.

Google's win somewhat softens the blow to software developers who previously thought programming language APIs were free to use. It's still the case that APIs can be protected by copyright under the law of at least one appeals court. However, the first high-profile attempt to control APIs with copyright law has now been stymied by a "fair use" defense.

It isn't clear how much Oracle would have asked for in the damages phase, but it could have been as much as $9 billion. That's how much Oracle asked for in an early expert report.

Over the course of the two-week trial, jurors heard testimony from current and former CEOs at Sun Microsystems, Google, and Oracle, as well as in-the-trenches programmers and computer experts from both companies.

Oracle, which acquired Java when it purchased Sun Microsystems, sued Google over the APIs in 2010. In 2012, following a first jury trial, US District Judge William Alsup ruled that APIs can't be copyrighted at all, but Alsup's opinion was overturned on appeal. At this month's trial, Google's only available argument was that the 37 APIs constituted "fair use."

During the trial, Oracle argued that Google copied parts of Java API packages as well as related declaring code, in order to take a "shortcut at Oracle's expense." As Android prospered, Oracle's Java licensing business, centered largely around feature-phones, cratered.

"They copied 11,500 lines of code," Oracle attorney Peter Bicks said during closing arguments. "It's undisputed. They took the code, they copied it, and put it right into Android."

Google countered that the Java language has always been "free and open" to use—and that included re-implementing Java APIs. Sun and its CEO Jonathan Schwartz accepted Android as a legitimate, if inconvenient, competitive product.

Oracle CEO Larry Ellison welcomed Android at first, but later he "changed his mind, after he had tried to use Java to build his own smartphone and failed to do it," Google attorney Robert Van Nest told the jury.

More from the Oracle v. Google trial: