A federal appeals court on Friday said Oracle Corp must face a second trial with SAP in a case where the European software company admitted massive copyright infringement, unless Oracle is willing to accept $356.7 million of damages.

The case involved accusations that SAP's TomorrowNow unit wrongfully downloaded millions of Oracle files.

A federal jury had in 2010 awarded Oracle $1.3 billion of damages, but the trial judge said Oracle had proven actual damages of only $272 million. Oracle refused to accept that sum, leading to its appeal on damages.

In Friday's decision, the 9th U.S. Circuit Court of Appeals said the trial judge incorrectly calculated the damages that Oracle had proven, and must offer it a choice between accepting $356.7 million of damages or going to trial a second time.