Eddie Lampert will get another shot at keeping Sears Holdings Corp. from liquidation.

The Sears chairman and former chief executive officer must put up $120 million by Wednesday to get a chance to take part in an auction against other bidders, Ray Schrock, Sears’s lead lawyer, said at a court hearing Tuesday. Of that amount, $17.9 million is nonrefundable, he said. As many as 50,000 jobs are at stake.

“Hopefully, we’ll be able to get to an auction and have a chance to save Sears as a going concern,” Schrock said.

Lampert will be able to use debt he controls as part of his bid, a process known as “credit bidding,” Schrock said. But the company will reserve the right to review that offer and compare it to others. Bankruptcy Judge Robert Drain said that means Lampert’s use of a credit bid has not been preapproved. The billionaire’s $4.4 billion offer for selected stores, rejected last week, was funded partly by the conversion of debt to equity.

The official committee of unsecured creditors will continue to challenge the legitimacy of the debt Lampert holds, the panel’s attorney, Abid Qureshi, told the judge. That could make it harder for Lampert to use the debt as if it were cash at an auction.

Drain reminded the Sears lawyers that the company has an obligation to review all its options, not just the offer from Lampert and his hedge fund, ESL Investments Inc.

At the same time, the 126-year-old retailer is still preparing for liquidation, Schrock said.

“ESL appreciates the encouragement from the court and the constructive engagement of the debtors as we work to formalize our going-concern proposal so that it can be evaluated at the upcoming auction,” an ESL spokesman said in a statement. “We believe in Sears and will continue to do everything we can to ensure that it has a profitable future.”

Sears, the descendant of the mail-order catalog that reshaped American commerce, filed for bankruptcy in October. Lampert and ESL Investments rank as Sears’s biggest shareholder and creditor. They held about $2.5 billion in Sears debt as of September, the result of multiple attempts to keep the chain afloat. The former CEO spent years trying to save the iconic retailer, shuttering hundreds of money-losing stores, cutting more than $1 billion in annual expenses, and spinning off units such as Lands’ End Inc.

As late as Monday night, the company had told involved parties it was planning to announce a liquidation before the market opened on Tuesday in New York, according to a person with knowledge of the matter.

The final push to save Sears from liquidation stretched over the weekend and into three hours of negotiations in a White Plains, N.Y., courthouse Tuesday morning.

The hearing was delayed twice as about a dozen lawyers for Sears and ESL continued talks in the corridor, decorated by a large Christmas tree and a menorah, outside the courtroom. The advisers twice updated Drain in his chambers. At one point, the lawyers were talking at once and a court officer said, “Sounds like a zoo in here.”

“It is a zoo!” one of the lawyers replied.

The agreement to allow Lampert another chance was announced shortly after 1 p.m.

It’s not the first frenzied deal Sears has made during its bankruptcy. When the company was in court Nov. 27 to finalize bankruptcy financing, a hedge fund affiliated with ESL swooped in to ignite a last-minute bidding war for the right to lend to it.

“Most likely, the bid still goes nowhere,” said Jared Ellias, a professor at the University of California’s Hastings College of Law. “But it’s part of the dance of ‘having every last conversation.’ Liquidating an American icon is something one should do one’s best to avoid.”