New York CNN Business  — 

Barnes & Noble, which has struggled to compete with Amazon for the past decade, is going private.

The company said Friday it is being bought by a fund run by private equity firm Elliott Management for $683 million.

Barnes & Noble (BKS)’s stock surged 30% Thursday on rumors of an imminent sale. The stock rose another 10% in premarket trading Friday. But the $6.50 a share purchase price for Barnes & Noble (BKS) is a far cry from its peak of above $30 in 2006.

Barnes & Noble tried (but mostly failed) to keep pace with Amazon (AMZN). Pressure only intensified after Amazon (AMZN) started to open physical book stores of its own.

The company’s Nook e-reader device was also a flop, never catching on in the way that Amazon’s Kindle did. And a spin-off of the company’s campus book stores into the separately traded Barnes & Noble Education (BNED) in 2015 failed to get the more focused and smaller Barnes & Noble back on track either.

That led the company to say last October that it was pursuing a sale. And now that Barnes & Noble will be a private company, it no longer has to worry about quarterly sales reports and continued unfavorable comparisons to Amazon from Wall Street.

Elliott recently bought UK book store chain Waterstones as well.

“We are pleased to have reached this agreement with Elliott, the owner of Waterstones, a bookseller I have admired over the years, said Barnes & Noble founder and CEO Leonard Riggio in a statement. “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.”

James Daunt, CEO of Waterstones, will take over as CEO of Barnes & Noble too, although Waterstones and Barnes & Noble will remain separate entities.

So it may be the end of an era for Barnes & Noble. But the company at least is avoiding the fate of its rival Borders, which closed its stores for good in 2011.