An SAP AG subsidiary pleaded guilty to 12 criminal counts and will pay a $20 million fine for unauthorized downloads from software rival Oracle Corp.

As part of the agreement, SAP AG will not be charged with any criminal wrongdoing, SAP attorney Tharan Greg Lanier said on Wednesday.

The criminal case is part of a long-running legal controversy involving SAP and Oracle. Last year, a civil jury awarded Oracle $1.3 billion over accusations SAP subsidiary TomorrowNow, now defunct, wrongfully downloaded millions of Oracle files.

U.S. District Judge Phyllis Hamilton of Oakland, California, who has presided over the civil and criminal cases, later reduced that award to $272 million. Oracle is seeking permission to appeal that ruling.

TomorrowNow's chief executive chairman, Mark White, entered the company's guilty plea on Wednesday in a hearing before Hamilton. White is also CFO of SAP's Global Field Organization.

We believe that the resolution of this investigation is fair, SAP spokesman James Dever said in a statement. We are pleased to have come to an appropriate conclusion of this process.

At the plea hearing, Judge Hamilton expressed confusion over how the shuttered TomorrowNow could enter into a plea.

I thought TomorrowNow didn't really exist, Hamilton said.

Lanier told Hamilton that SAP would stand behind TomorrowNow's promises as its corporate parent. Hamilton ultimately accepted the plea arrangement, which includes a term of probation.

TomorrowNow currently has less than 10 employees, Lanier said.

The $20 million criminal fine reflects the seriousness of the conduct, Assistant U.S. Attorney Kyle Waldinger said, noting that Oracle can seek restitution through its civil case.

Oracle was notified that it could address the court during sentencing, Waldinger said. However, no Oracle representatives appeared.

Oracle has spent the last four years uncovering SAP's massive copyright theft and SAP finally pleaded guilty in federal court to criminal charges for its illegal scheme, Oracle spokeswoman Deborah Hellinger said in an email after the hearing.

In outlining the plea deal, Hamilton said TomorrowNow must cooperate with the government in its continuing investigation of federal violations surrounding Oracle.

Prosecutors declined to comment as they exited the courtroom on Wednesday. Lanier also declined to discuss SAP's interactions with prosecutors.

TomorrowNow is the sole defendant that has faced charges in the criminal case. No individuals have been charged.

The civil case in U.S. District Court, Northern District of California is Oracle USA, Inc., et al. v. SAP AG, et al, 07-cv-1658.

The criminal case in the Northern District of California is United States of America v. TomorrowNow Inc., 11-cr-0642.

(Editing by Phil Berlowitz, Andre Grenon and Steve Orlofsky)