Just about eight months after Barnes & Noble revealed it was exploring a possible sale, the embattled bookseller has settled on a buyer.

The mega-chain, which boasts 627 locations across the U.S., announced Friday that the Elliott Management Corp. has agreed to buy Barnes & Noble for about $683 million — a price tag that includes the bookseller’s debt, which Elliott will take on as part of the deal.

The move marks Elliott’s second major splash in the world of books in the span of a year. Last June the New York-based hedge fund acquired Waterstones, which, with more than 280 bookshops, is the largest retail bookseller in the U.K.

Now, Elliott is set to own the largest bookseller in the U.S., too.

“We are pleased to have reached this agreement with Elliott, the owner of Waterstones, a bookseller I have admired over the years,” Leonard Riggio, the founder of Barnes & Noble’s modern iteration and still its chairman, said in a statement released Friday. “In view of the success they have had in the bookselling marketplace, I believe they are uniquely suited to improve and grow our company for many years ahead.”

Elliott was careful to note that “each bookseller will operate independently” — but added that “they will share a common CEO and benefit from the sharing of best practice between the companies.” That CEO is James Daunt, the British-born chief of Waterstones, who plans to head up both companies from New York City.

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

He’s not kidding about those “fearsome challenges.”

Once the towering Goliath of the bookselling world, these days Barnes & Noble is getting dwarfed by primarily online competitors — particularly Amazon, which reportedly sells nearly 50 percent of all new books. The bricks-and-mortar giant, on the other hand, has seen its revenue slide each year for the past several years.

There is hope, however.

Daunt has been credited with helping turn the fortunes of Waterstones, which less than a decade ago was “losing horrendous amounts of money,” in the words of its CEO. Lately, the British bookseller has been reporting leaps in profits. The financial backing of Elliott, which says it currently manages approximately $34 billion in assets, shouldn’t hurt Barnes & Noble either.

The U.S. bookseller expects the deal to close by the end of September.