After six months in which Amazon clamped down on sales of Hachette Publishing Group books on its website, the two announced a multi-year agreement on ebook and print book sales in the US market.
The spat over who sets retail prices for online sales, especially ebooks, had outraged Hachette authors who saw their book sales sink after Amazon leveraged its power as the largest book retailer in the United States.
The two said in a statement that the deal, which came just as the holiday shopping season was opening, would be a plus for both authors and readers.
"Amazon and Hachette will immediately resume normal trading, and Hachette books will be prominently featured in promotions," they said in a statement.
Their fight raised issues over Amazon's overwhelming pricing power in the market vis-a-vis both publishers and readers, with the company facing protests not only in the United States but in Europe as well.
But it also brought a focus on the portion of the retail price that goes to the authors and how that is decided by publishers.
At one point, more than 900 authors, many of them perennial producers of best-sellers, signed a letter urging the two to settle the battle.
And popular comedian Stephen Colbert, a Hachette author, used his late-night television show to call for a boycott of Amazon, quipping that "Because of Amazon's scorched-earth tactics, more people are getting screwed than in 'Fifty Shades of Grey.'"
Such criticisms were effective in steering some book buyers to other online distributors as well as physical stores, though the size of that shift is not clear.
Amazon reported a higher loss in third-quarter earnings in October, but that was blamed mainly on the cost of promoting new products as well as its fight to retain market share based on low pricing.
The deal Thursday came just in time for the year-end holiday shopping season, important for both companies, as Arnaud Nourry, chief executive of Lagardere Publishing, Hachette's French parent, said Thursday.
"It's Christmas coming, so on both sides, we did it to have a better season," he said in an earnings conference call in France Thursday.
No specific terms for the deal were released, but in a statement the two companies said Hachette will have the responsibility for setting retail prices for ebooks beginning in early 2015.
US-owned Amazon, meanwhile, said Hachette would have incentives to keep its prices low.
"This is great news for writers," said Michael Pietsch, chief executive of Hachette Book Group.
"It gives Hachette enormous marketing capability with one of our most important bookselling partners."
David Naggar, vice president for Kindle, the ebook unit of Amazon, said incentives for Hachette to hold prices down "will be a great win for readers and authors alike."
Hachette's Nourry said the main point is that "we will decide the price to consumers. There will be no discounting per this agreement."
Bestselling Hachette author Douglas Preston, who organized the authors' petition for the companies to resolve their spat in August, said he was relieved at the news of the deal.
"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," he told AFP.
Roxana Robinson of the Authors Guild, which had talked of seeking an antitrust probe of Amazon, welcomed the end of the standoff, crediting in part the pressure from authors for a resolution.
But she was not certain it would improve the earnings of writers.
"We've heard that this deal is favorable to authors, but we have no way of knowing right now," she told AFP.
"In the meantime, it's our hope that Hachette, in light of the loyalty its authors have shown throughout this debacle takes this opportunity to revisit its standard ebook royalty rate of 25 percent of the publisher's net profits."