An SAP AG subsidiary pleaded guilty to 12 criminal counts and will pay $20 million over 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.

A judge has since 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 a federal judge in Oakland, California. 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.

TomorrowNow is the sole defendant that has faced charges in the criminal case. No individuals were 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.

(Reporting by Dan Levine; editing by Phil Berlowitz and Andre Grenon)