NEW YORK (Reuters) - A federal judge on Wednesday said he was prepared to approve Philadelphia Energy Solutions’ bankruptcy plan which includes the sale of the largest East Coast oil refinery to a Chicago real estate developer for $252 million.

FILE PHOTO: Sun sets on the Philadelphia Energy Solutions plant refinery in Philadelphia, Pennsylvania, U.S., January 9, 2020. Picture taken January 9, 2020. REUTERS/Mark Makela/File Photo

The refinery, which had capacity to process 335,000 barrels of crude oil per day into gasoline and other energy products, has been closed since June after a major fire. It would be permanently shuttered and redeveloped for warehouses under the bankruptcy plan.

Delaware bankruptcy Judge Kevin Gross delayed his confirmation of the plan until Thursday to allow himself and stakeholders time to review the details. But Gross said in a hearing on Wednesday that he was likely to approve the proposal.

As part of the agreement, Chicago-based Hilco Redevelopment Partners will buy the more than 1,300-acre refinery site for $252 million, $12 million more than initially agreed upon.

The Chapter 11 bankruptcy plan also calls for a $20 million settlement for unsecured creditors and another $5 million in a severance pool for laid-off unionized refinery workers.

The plan would additionally pay executives of the bankrupt refiner as much as $20 million in bonuses on top of millions in retention bonuses paid just after the fire.

The deal would permanently end operations at the South Philadelphia refinery, the largest and oldest on the U.S. East Coast.

“I am very much satisfied with the sale to Hilco as the highest and best bid,” Gross said. “This clearly is in the best interest of the community, as well, given the risks that were attendant to the prior operations with the refinery.”

PES, owned primarily by investment bank Credit Suisse and investment firm Bardin Hill, entered bankruptcy on July 21, a month after a fire and explosions tore through a section of the refinery. The plant was idled and more than 1,000 full-time workers laid off including 640 United Steelworkers members.

Shortly after shutting the refinery, PES put its assets up for sale. It held an auction in New York last month in which Hilco was selected as the winning bidder. Industrial Realty Group (IRG) was selected as a backup bidder.

PES attorneys said they continued to negotiate with both real estate developers after the auction and recently secured a bigger purchase amount from Hilco by leveraging interest from IRG.

The refiner has fielded about a dozen separate objections to its bankruptcy plan by its unsecured creditors, the Environmental Protection Agency, Internal Revenue Service and others. But objections to the plan were either withdrawn or overruled by Gross at Wednesday’s hearing.

PES exited a separate Chapter 11 bankruptcy in 2018 after years of struggling financially under the ownership of Carlyle Group.