The U.S. Bankruptcy Court on Thursday formally approved the sale of the shuttered Philadelphia Energy Solutions refining complex to Hilco Redevelopment Partners, closing a chapter of the city’s industrial history and raising the prospect for new uses of a 1,300-acre property on the city’s southern gateway.

Judge Kevin Gross signed a confirmation order Thursday afternoon on PES’s reorganization plan, providing for the sale of the refinery, and a map for dividing the remaining assets among creditors whom PES owes hundreds of millions of dollars. The company declared bankruptcy in July after a devastating fire and explosions.

Hilco, which is based in Chicago, agreed to pay $252 million for the refinery, which it wants to demolish and rebuild as a mixed-use industrial park. It aims to close the sale by the end of May, if it is able to reach agreements with regulators, and a previous property owner, on plans to clean up the contaminated property.

The final order was signed after marathon closed-door negotiations Wednesday and a dramatic hearing in Wilmington, the urgency driven by Hilco’s requirement that the confirmation order needed to be signed by Thursday or the deal was off.

As details of the plan emerged Thursday, it became clear that many issues still must be sorted out before PES is finally put to rest. Several key objections — including one from Sunoco Inc., a former refinery owner, over the recognition of pipeline easements and deed restrictions that limit the property’s redevelopment — were resolved by including language in the order that acknowledges those issues remain unresolved.

One major issue looming over the refinery is the unresolved settlement of the company’s insurance claims, which potentially could generate far more money for creditors than the sale of the refinery. PES late Wednesday filed a separate suit in Bankruptcy Court against 26 insurance carriers over their failure to pay $1.25 billion in coverage for damage from the June 21 fire and the loss of business.

“In the company’s hour of need, the insurers’ response has been to feign cooperation while preparing to avoid their clear coverage commitments,” PES said in its suit. That litigation could go on for months, even years, though it would not affect the sale and redevelopment of the property to Hilco.

Environmentalists and community activists rejoiced Thursday at the permanent closure of the East Coast’s largest refinery. Many of the 1,100 refinery workers whose jobs were abruptly terminated last summer expressed frustration with their union’s national leadership for endorsing a bankruptcy plan that certifies most of their jobs will disappear forever.

The union members aimed much of their anger at Thomas M. Conway, the international president of the United Steelworkers, who said he signed off on the PES reorganization plan after it became clear that a rival bidder, Industrial Realty Group (IRG), whom many believed would resume refining operations, was "never able to put forward a concrete plan.

“Hilco’s was the only bid, and we were compelled to make an agreement with them,” Conway said in an open letter posted Thursday on the USW website. In exchange for dropping its objections to the plan, the Steelworkers negotiated to receive $5 million in severance payment to union members, as well as guarantees of union representation for workers who will remain as caretakers until the refinery is dismantled.

“Our only option was to turn our fight toward ensuring that you were not left empty handed,” he said in the letter.

Conway’s letter only seemed to inflame more online anger under the hashtag #USWConwaySellout.

The severance pay and a guarantee of union representation were an insufficient consolation prize, said Ryan O’Callaghan, the former president of Steelworkers Local 10-1, which represents PES refinery workers.

“We wanted our jobs back,” he said.

Philip Rinaldi, a retired PES chief executive who teamed up with IRG to promote an unsuccessful effort to resume oil refining, said that IRG might still salvage something out of the process. If Hilco is unable to close the deal, IRG is listed as the backup bidder.

“We’re greatly disappointed,” Rinaldi said Thursday. “We think that the property is enhanced with a refinery. But we’re still hopeful.”

Another company that is still hanging on to hope is Point Breeze Renewable Energy, a biogas producer that secured a deal in 2017 to build a $120 million plant on the refinery site to produce renewable natural gas from food waste. Point Breeze, which was in advanced planning for its project and had applied for city permits, objected to the reorganization plan because Hilco included language that specifically renounced the lease.

The court’s final order allowed the rejection of the lease but also recognized that the biofuel producer and PES can continue to litigate. Jim Potter, the president of Point Breeze Renewable Energy, said Thursday his company and Hilco are engaged in negotiations that might resolve the issue by allowing Point Breeze to become one of Hilco’s first tenants, but on a different parcel than originally planned.

“We actually feel good about it,” Potter said. “We feel like we’re going to come to a new lease agreement.”