Stay on Top of Emerging Technology Trends Get updates impacting your industry from our GigaOm Research Community

Apple(s appl) has finally bowed out of a high stakes legal battle over ebooks and agreed to a settlement that could soon see the tech giant paying out millions to customers who purchased titles at online retailers like Amazon(s amzn) and Barnes & Noble(s bn).

According to a letter to the court filed in New York, and embedded below, Apple has reached an agreement with class-action lawyers and state attorneys general that will see the parties cancel a damages trial set for July.

The settlement is under seal for now and must be approved by the court, but is likely to be worth hundreds of millions of dollars. The money will come on top of the $160 million or so that the five publishers agreed to pay as a result of settlements reached last year.

Apple will, however, continue to appeal a verdict from last year in which U.S. District Judge Denise Cote concluded that the company had masterminded a scheme to raise the price of ebooks.

Apple will likely make its case to a New York appeals court this summer, but the appeal can be considered a long shot. According to a letter describing the settlement, the money reserved for consumers will be contingent on that appeal.

In agreeing to settle the case, Apple may be seeking avert a triple damages rule that could have been imposed at trial. Apple did not immediately respond to a request for comment.

The agreement comes after class-action lawyers and state governments sought civil penalties from Apple for violating antitrust laws. Under a complicated legal process, consumers in 17 states are represented by the class action lawyers, while those in other states are represented by their respective state governments.

Here is the letter from class action lawyer Steve Berman and one from Judge Cote, which contain further details. Update: here’s a Q&A about what happens next, including how you might get paid.

An earlier version of this story incorrectly referred to a jury verdict; the verdict was by Judge Cote.

Steve Berman Settlement Letter

[protected-iframe id=”1e4563b55c4374704a378bdf7bbbf355-14960843-34118173″ info=”//www.scribd.com/embeds/230010850/content?start_page=1&view_mode=scroll&show_recommendations=true” width=”100%” height=”600″ frameborder=”0″ scrolling=”no”]

Cote Letter Re Apple Settlement

[protected-iframe id=”c6b2ba4584a3524a3dcfc793947b4b81-14960843-34118173″ info=”//www.scribd.com/embeds/230011101/content?start_page=1&view_mode=scroll&show_recommendations=true” width=”100%” height=”600″ frameborder=”0″ scrolling=”no”]