Apple (AAPL) reached a settlement in a class-action lawsuit related to its e-book business. The tech giant had been accused of price-fixing and plaintiffs had been seeking $840 million in damages.

The lawsuit has been going on for over two years. The U.S. Department of Justice sued Apple, Hachette Book Group, HarperCollins, Penguin Group, Macmillan and Simon & Schuster, accusing them of collaborating to raise e-book prices. Thirty-three states as well as individual consumers have also filed a class-action lawsuit about the alleged price collusion.

The publishers have already agreed to pay more than $166 million to settle the antitrust chargers. The terms of the new agreement will not be revealed until they are approved by the court.

Last summer, a federal court found Apple guilty of colluding with the publishers. Apple is appealing that decision and the new settlement will depend on the outcome.

It has been argued that Apple began this book price strategy in order to gain market share from Amazon (AMZN), when it introduced the iPad in 2010. Apple tried to appeal to publishers who were dissatisfied with Amazon’s low prices. Amazon is expected to unveil its first smartphone tomorrow, which may result in more e-book competition.

Apple also recently settled another class-action lawsuit concerning employee wages. Apple, Google and other tech giants were accused of agreeing not to poach each other’s talent in an effort to keep costs down.

The companies agreed to pay $324.5 million in damages, which is expected to be approved at a hearing on Thursday.

Apple shares are currently trading around $92, following a recent 7-for-1 stock split. The company has a market cap of $556 billion.

 

Follow Katie Roof on Twitter @Katie_Roof