SAP AG will be paying Oracle 1.3 billion in damages, one of the largest awards ever given in a copyright infringement suit.

On Tuesday, after a three-year legal battle, a jury in the U.S. District Court for the Northern District of California found SAP AG guilty of copyright infringement. The copyright violation was committed by a now-defunct business unit of SAP called TomorrowNow.

TomorrowNow illegally downloaded and copied Oracle software in the course of its business, supporting Oracle customers. SAP admitted to the copyright infringement, and Judge Phyllis Hamilton, in her instructions to the jury, said those allegations had to be treated as proved - the question was how to calculate the damages, and that was the crux of the three-week trial.

The jury could choose between the fair market value of the licenses that SAP would ordinarily have to pay for, or by calculating lost profits and losses to Oracle caused by TomorrowNow's actions. The latter tends to lead to bigger verdicts, and that is what the jury chose.

High-profile witnesses made their appearance, such as Oracle CEO Larry Ellison, who said the actions by SAP cost his company $4 billion. Other Oracle executives had pegged the damages anywhere from $2 billion to $7 billion. SAP argued for $40 million.

The trial presented some interesting twists - at one point it looked as though Oracle would summon former SAP executive Leo Apotheker, who is currently CEO of its biggest rival, Hewlett-Packard, to testify. That didn't happen.

SAP, through its attorneys, has said it is disappointed with the verdict but has not said whether it will file an appeal.