A customer enters a Sears store in Riverside, Ill., on Dec. 28. (Tannen Maury/EPA-EFE/REX/Shuterstock)

Sears — the iconic retail chain that was forced into bankruptcy in October — avoided a total shutdown after billionaire Eddie Lampert, the company’s chairman and largest shareholder, won a bankruptcy auction for Sears Holdings Corp., according to a person familiar with the matter.

Last week, Lampert upped his offer to more than $5 billion as part of a pitch to keep about 400 stores open nationwide. The proposal was made through Lampert’s hedge fund, ESL Investments, and will save as many as 45,000 jobs. Reuters reported the bankruptcy auction concluded early Wednesday morning, with Lampert ultimately prevailing with a $5.2 billion takeover bid. But it remains to be seen how Lampert will turn his remaining stores into lasting footprints in a retail landscape that looks far different from the one Sears once conquered.

A Sears Holdings spokesman declined to comment Wednesday.

For much of its 126-year history, Sears was a ubiquitous presence in American retail, selling everyday items such as toys, clothes and even houses through its cavernous showrooms and signature catalogues. But it eventually lost its hold on shoppers, who turned to big-box competitors such as Walmart or online behemoths such as Amazon. (Amazon founder and chief executive Jeffrey P. Bezos owns The Washington Post.)

About five years ago, the company had 2,000 Sears and Kmart stores. When Sears merged with Kmart in 2005, Sears Holdings boomed to become the nation’s third-largest retailer, with $55 billion in annual revenue and 3,500 stores. Lampert had said he could return Sears and Kmart to their former glory by combining the companies, selling off some of their most lucrative assets and then using the profits to revamp the stores for e-commerce.

But the company hasn’t turned a profit since 2010, and Lampert sold off many of its brands, including Craftsman tools. Massive showrooms fell into disrepair, and the stock price took a nose-dive. On Wednesday afternoon, the share price was 75 cents.

When Sears filed for Chapter 11 bankruptcy protection, the company had about $5.6 billion in outstanding debt. It said it would close 142 unprofitable stores at the end of 2018 — with dozens more closures announced in the past few months. As part of the bankruptcy process, Lampert stepped down from his role as chief executive but stayed on as chairman of the board.

To stay afloat, Sears will have to find a way to make up for its shrinking scale, said Christina Boni, Moody’s vice president. That includes keeping an efficient supply chain as the company’s store numbers continue to dwindle. Plus, like all retailers, Sears will have to convince customers that it can still deliver on products and services as its physical footprint shrinks. Kmart in particular continues to struggle as a smaller-scale discount store in the shadows of competitors like Walmart and Target, Boni said.

“The bar keeps rising, the level of execution keeps rising, so it’s tougher to be a weaker or lower-tier player at this point in the U.S. retail landscape,” Boni said.

Sears’s potential demise has threatened the livelihoods of thousands of workers, with the possibility of liquidation jeopardizing their severance pay and other assistance. Through a workers-rights group, many employees have pressured Sears to create a financial hardship fund that would give workers a week’s pay for each year with the company — which would cost more than $100 million.

Lily Wang, deputy director of Organization United for Respect’s Rise Up Retail campaign, said that for workers in the surviving stores, there was a degree of relief. But Wang said that comfort is only temporary. Given Lampert’s past handling of the company, “I don’t think anyone thinks their job is safe under his leadership."

Gabe Maguire knows the personal toll of a store closure. Maguire works at a Kmart in Asheville, N.C., that is slated to shut down in March. If the remaining 400 stores can survive, Maguire said, Lampert has to invest in fixing the infrastructure within stores, making sure locations are fully staffed and providing employees with the supplies they need to do their jobs.

Now, with the end of their own job in sight, Maguire worries that in time, others will meet the same fate.

“I don’t have high hopes for the company,” Maguire said. “Our store is closing anyway, but we are glad for the people who get to keep their jobs a little longer.”

Read more:

One way Blue Apron is looking to turn itself around in 2019

Early holiday shopping numbers are on track to break season records

Looking for a socially conscious holiday gift? You may have to decide between principles and price.