Bookstore chain Barnes & Noble has agreed to sell itself to an arm of investment firm Elliott Management, which owns one of the largest booksellers in the United Kingdom.

Elliott will pay about $476 million for Barnes & Noble, which has been ailing amid competition with Amazon and other physical retailers. When including the assumption of debt, the deal is worth about $683 million.

With 627 stores in 50 states, Barnes & Noble is the nation's largest bookstore chain, having outlived its biggest rival, Borders, yet run into similar challenges as Americans increasingly buy books online.

Barnes & Noble chairman and founder Leonard Riggio, who exerts significant control over the retailer, has agreed to support the deal.

Elliott Management also owns U.K. bookstore chain Waterstones, whose CEO, James Daunt, will also serve as CEO of Barnes & Noble.

Despite the combined management team, Barnes & Noble will remain as a standalone chain, the companies said.

Elliott Management signaled plans to pursue a "growth strategy" predicated on a blueprint that worked with Waterstones, which included "investment in their store estate and the empowerment of local bookselling teams."

Deal rumors surface:Barnes & Noble negotiates sale to Elliott Management

CEO fired in 2018:Barnes & Noble dismisses Demos Parneros for 'violations of the company's policies'

"Physical bookstores the world over face fearsome challenges from online and digital," Daunt said in a statement. "We meet these with investment and with all the more confidence for being able to draw on the unrivalled bookselling skills of these two great companies."

Elliott Management's Elliott Advisors Limited is paying $6.50 per share for Barnes & Noble, which represents a 43% premium from its 10-day weighted average closing price as of June 5.

Barnes & Noble's sales for the holiday quarter ended Jan. 26 rose 1.1% at stores open at least a year, representing the chain's best quarterly output in several years. The company's quarterly profit was $66.9 million, a year after losing $63.5 million.

Follow USA TODAY reporter Nathan Bomey on Twitter @NathanBomey.