Apple has reached an out-of-court settlement with a group of states who had accused the company of conspiring with publishers to fix the prices of e-books. (Don Emmert/AFP/Getty Images)

Apple has reached a settlement with a group of states and consumers who filed a class-action lawsuit accusing the company of leading a conspiracy to drive up e-book prices, according to documents filed Monday in a New York court.

The terms of the agreement, which allowed Apple to avoid a jury trial scheduled to begin next month, were not revealed and must be approved by the court. The plaintiffs had sought $840 million in damages from Apple, claiming that the company’s alleged price-fixing scheme cost consumers millions of dollars. Apple has denied breaking any antitrust laws.

Steve Berman, the plaintiffs’ lead attorney, said in a letter to the court that the agreement is contingent on the outcome of Apple’s appeal of a year-old ruling in a separate case that came as a significant defeat for the world’s largest technology company. That ruling, handed down in favor of the Justice Department by a federal court in July, found Apple guilty of illegally colluding with five major book publishers in an effort to challenge’s near-monopoly of the e-book market.

According to the Justice Department’s 2012 complaint, Apple took advantage of the book publishers’ frustration with Amazon’s low e-book prices to facilitate an illegal deal that would drive up prices and make Apple a player in the e-book market as it prepared for the 2010 launch of the iPad.

The publishers — Hachette Book Group, HarperCollins Publishers, Macmillan, Penguin Group and Simon & Schuster — were named in the Justice Department’s original lawsuit filed in April 2012 but settled for more than $166 million to avoid trial. Apple, however, unsuccessfully fought Justice’s lawsuit, resulting in the federal court’s July ruling to appoint a monitor to ensure that Apple would comply with antitrust laws. That decision remains under appeal.

In 2012, Apple reached a separate settlement with the European Commission, which had been investigating Apple and the same five book publishers for alleged violations similar to those made by the Justice Department and the U.S. class-action plaintiffs.

Apple spokeswoman Kristin Huguet declined to comment on Monday’s settlement. Berman also declined to comment, citing the preliminary state of the agreement.

The suit was filed by 33 attorneys general from states and other jurisdictions, including Virginia, Maryland and the District.

Gene I. Kimmelman, president and chief executive of the consumer advocacy group Public Knowledge, said he was surprised that the class-action settlement did not come sooner, particularly in light of the book publishers’ settlement with the Justice Department and Apple’s 2012 settlement with the European Commission.

“I’ve thought from the get-go that this is a real long shot on Apple’s part, and it surprises me that they continue to litigate,” Kimmelman said.

Kimmelman, formerly chief counsel of the Justice Department’s antitrust division, said it is “highly unlikely” that Apple will win its appeal of the decision.

The outcome of that appeal could have implications for Apple’s efforts to challenge Amazon’s control of the e-book market. Industry observers estimate that Apple sells between one-tenth and one-quarter of all e-books, a figure comparable to that of retailer Barnes and Noble but substantially below that of Amazon.

Monday’s settlement comes amid a battle between publishers and Amazon over the distribution and sales of e-books, which have transformed the book industry in recent years.