NEW YORK — Sears will live on— at least for now.

The company's chairman and largest shareholder, Eddie Lampert, won a bankruptcy auction for Sears, averting liquidation of the iconic chain, according to a source familiar with the negotiations. The person agreed to speak on condition of anonymity because they were not authorized to discuss the negotiation publicly.

Lampert is the only one to put out a bid for the whole company. The 56-year-old billionaire had sweetened his bid to more than $5 billion over the last few days through an affiliate of his hedge fund ESL. Details of the final terms couldn't be learned.

The plan still must be approved by the bankruptcy judge in White Plains, New York, who is presiding over the court case. 

Lampert, who steered the company into bankruptcy protection, may be able to keep the roughly 400 remaining Sears stores open, meaning tens of thousands of jobs have been saved, at least for now.

Whether Sears, founded 132 years ago as a mail order watch business, can survive in the Amazon era remains questionable. Already, Sears has outlasted Toys R Us, Sports Authority, Bon-Ton Stores and dozens of others that were unable to survive the torrents of a massive recession and unrelenting technological change.

Sears, which also operates Kmart, filed for Chapter 11 bankruptcy protection in October. At that time, it had 687 stores and 68,000 workers. At its peak in 2012, its stores numbered 4,000.

Lampert, who gave up the CEO title when the Sears filed for chapter 11, says there's still potential for the company.

Industry analysts are not so sure.

"While there's no doubt that a shrunken Sears will be more viable than the larger entity, which struggled to turn a profit, we remain extremely pessimistic about the chain's future," said Neil Saunders, managing director of GlobalData Retail. "In our view, Sears exits this process with almost as many problems as it had when it entered bankruptcy protection. In essence, its hand has not changed, and the cards it holds are not winning ones."

To survive, Sears needs to overhaul its business, revitalize aging stores and focus on major appliance and tools sales, say industry analysts. Still, it won't be easy. Walmart, Target and others have been heavily investing in stores and expanding online. The difference is that they have the capital to keep spending.

Under Lampert, Sears has survived by spinning off stores and selling brands that had grown synonymous with the company, like Craftsman. Lampert has loaned out his own money and cobbled together deals to keep the company afloat, though critics said he has done so with the aim of benefiting his ESL hedge fund. ESL has maintained that the moves put much needed cash into the business.

Lampert personally owns 31 percent of the Sears' outstanding shares and his hedge fund has an 18.5 percent stake, according to FactSet.

Four years ago the company created a real estate investment trust to extract revenue from the enormous number of properties owned by Sears. It sold and leased back more than 200 properties to the REIT, in which Lampert is a significant stake holder.

He stands to realize a big tax gain keeping Sears alive, using the company's years of net operating losses to offset future taxable income if one of his other companies takes over the chain, says David Tawil, president and co-founder of Maglan Capital, which follows distressed companies.

Tawil and others believe Lampert wants to be in full control of liquidating Sears' assets, including real estate.

Lampert combined Sears with Kmart in 2005, about two years after he helped bring Kmart out of bankruptcy. He pledged to return Sears to greatness, but that never happened.

The company, hammered during the recession and outmatched in its aftermath by shifting consumer trends and strong rivals, hasn't had a profitable year since 2010 and has suffered 11 straight years of annual sales declines. Lampert has been criticized for not investing in the stores, which remain shabby.