Updated with additional details, background.

NEW YORK ( TheStreet) -- Blockbuster ( BLOAQ.PK) and its creditors have reached an agreement on the sale of the company.

The revised deal received a favorable ruling from the bankruptcy court reviewing the company's reorganization Thursday, allowing the flailing movie retailer to avoid a Chapter 7 liquidation filing.

>>Blockbuster Timeline: From Opening to Closing Credits

"The parties have come to an accord and presented us with a more palatable situation," said U.S. Bankruptcy Judge Burton Lifland in Manhattan.

The agreement sets up an auction. A date has not yet been set.

A list of 45 creditors, including Walt Disney ( DIS), Yahoo ( YHOO) and Sony ( SNE), had previously opposed a "stalking horse" bid of $290 million Blockbuster received in February from Cobalt Video, a limited liability company formed by funds managed by Monarch Alternative Capital, Owl Creek Asset Management, Stonehill Capital Management and Värde Partners.

Even Judge Lifland last week opposed the bid, calling it too "aggressive." "If anything is going to fly, this garbage truck better sprout wings," he said in Manhattan court.

The parties were able to agree that if the consortium were to purchase Blockbuster, it could not force the company into Chapter 7, which would essentially liquiate it.

Under the agreement, movie studios and other creditors would receive more money upfront for what they are owed and would receive a share of any offer about the $290 million bid.

Blockbuster owes major studios like Fox, Warner Brothers and Paramount about $100 million in administrative fees. They will receive about 24% of that money right away if a deal is completed by Cobalt.

If you liked this article you might like

Blockbuster Tries to Lure Netflix Customers

Dish Has Funny Plans for Blockbuster

Dish Has Funny Plans for Blockbuster

Netflix Dishes About Blockbuster Deal

Netflix Dishes About Blockbuster Deal

Dish Network's Blockbuster Bid Approved

Dish Network's Blockbuster Bid Approved

March Retail Sales: Live Blog

March Retail Sales: Live Blog