In a joint statement, Amazon.com and Hachette Book Group announced they have resolved their months-long dispute over e-book prices. (Photo by: Emmanuel Dunand/AFP/Getty Images)

Amazon.com and the Hachette Book Group announced Thursday that they have reached an agreement to end their long-running dispute over e-book pricing. The fight escalated to such a level that Amazon did not offer discounts on books written by Hachette authors and prevented customers from pre-ordering new Hachette titles.

The firms announced the deal in a joint press statement, but did not disclose the terms. It is a "multi-year agreement for e-book and print sales in the U.S.," the statement said. The new deal will take effect in 2015. Hachette, which is a part of the media conglomerate Lagardere SCA, will set the prices for e-books as part of the deal. Amazon will resume selling Hachette books as usual.

The companies have been fighting for months over how book profits should be split between the publisher, authors and Amazon. The dispute drew the attention of high-profile authors including Stephen King and Robert Caro, who spoke out against what they perceived as the stranglehold that Amazon has on the e-book market. Yet other, largely independent authors defended Amazon and said that the company has transformed the publishing world in a way that makes it easier for writers to distribute their work.

Hachette and Amazon did not hold back in trading barbs over the course of the dispute -- each accused the other of making authors and consumers pawns in a bid to grab more money. But in the statement announcing the end of the dispute, both sides also claimed victory.

"This is great news for writers," said Michael Pietsch, Hachette Book Group's chief executive in a statement. "The new agreement will benefit Hachette authors for years to come. It gives Hachette enormous marketing capability with one of our most important bookselling partners.”

"We are pleased with this new agreement as it includes specific financial incentives for Hachette to deliver lower prices, which we believe will be a great win for readers and authors alike," said Amazon's David Naggar, vice president of its Kindle division.

Amazon and Hachette had been under considerable pressure to resolve their differences before the busy holiday season. The deal also comes close on the heels of an agreement Amazon struck with Simon & Schuster, the publisher owned by CBS Corp. As The Wall Street Journal reported, that deal also allows the publisher to set its own e-book prices, while also giving Amazon leeway to apply discounts in certain situations.

In a statement, the Authors Guild -- a trade group that represents writers --  said that it welcomed the end of the long fight, but that it was hard to judge the deal without specific details. "We’ve heard that this deal is favorable to authors, but we have no way of knowing right now," the group said in a statement.

Douglas Preston, an author who circulated a letter supporting Hachette that was signed by nearly 400 writers including King and Caro, said he was "relieved" that the dispute was over.

"I can only hope that, if disagreements arise in the future between Amazon and publishers, Amazon will never again seek to gain leverage by sanctioning books and hurting authors," Preston said.

Disclosure: Amazon CEO Jeffrey P. Bezos owns The Washington Post

Have more to say on this topic? Join us today for our weekly live chat, Switchback. We'll kick things off at 11 a.m. Eastern time. You can submit your questions now, right here.