In May, John Malone’s Liberty offered to buy all of Barnes & Noble for $1B. But the offer stalled and the book retailer said Thursday that the takeover talks had been ditched in light of the $204M investment agreement. Under the terms of the deal, Liberty Media bought preferred stock convertible into about 12 million Barnes & Noble shares at $17 apiece, giving it about a 17% stake in the company. The preferred shares will pay an annual dividend of 7.75%. Liberty will also get two seats on the company’s board of directors, which is being expanded to 11 members. It has nominated Greg Maffei, its president and CEO, and Mark Carleton, a senior vice president, to take the seats.

Barnes & Noble put itself up for sale last year in response to pressure from billionaire shareholder Ron Burkle, but the company didn’t strike a deal. Burkle, who has since stepped back and cut his stake, said Thursday in a statement that he had “grave concerns about the pricing and process.” Meanwhile, Barnes & Noble has continued to struggle along with other traditional book sellers — longtime rival Borders Group recently went out of business — facing tough competition from online retailers like Amazon.com and discounters like Wal-Mart. Leonard Riggio, chairman of Barnes & Noble, said the capital injection from Liberty will go toward expanding the company’s digital business.

Maffei said Liberty Media is “excited about Barnes & Noble’s prospects as the leading bookseller in the U.S. and its growth opportunities in the digital world.” A likely sales platform would be home-shopping network QVC, which Liberty runs through its Liberty Capital Group. Barnes & Noble shares were up 41 cents, or 3.4 percent, to $12.50 in after-hours trading. The stock lost 90 cents, or 6.9%, as part of a broad decline during the regular session. Shares in Liberty Media, which is based in Englewood, Colo., were unchanged in extended trading, ending down $4.92, or 6.8%, at $67.65.

For all of Deadline's headlines, follow us @Deadline on Twitter.