A federal judge finally confirmed the Chapter 11 bankruptcy plan of Philadelphia Energy Solutions (PES) on Thursday. The plan includes the sale of PES’s 1,300-acre refinery complex to a real estate company — putting an end to the largest oil refining operation on the East Coast.

A month earlier, dozens of Philadelphia-based climate activists made a trek to New York City to protest outside the building where a closed-door auction to sell the refinery site was being held. The activists hoped to prevent the site from being sold to a bidder with plans to keep the site running as a refinery. The following week, their wish seemed to have come true: Hilco Redevelopment Partners, a Chicago-based real estate company with a track record of turning defunct fossil fuel infrastructure into logistics centers, was the selected winner. For a moment, the future of the site looked bright. All that was left was approval from the bankruptcy court.

But the other bidders didn’t give up so easily. Industrial Realty Group (IRG), which had made a higher bid than Hilco, teamed up with Phil Rinaldi, the former chief executive of PES, to try to get the results of the auction voided so that IRG could continue running the site as a refinery. With the support of union leaders representing former refinery workers, Rinaldi urged the White House to get involved, arguing that more than a thousand jobs and national security interests were at stake. Peter Navarro, the assistant to President Trump for trade and manufacturing policy, openly backed IRG’s plan, telling the Philadelphia Inquirer, “We’d love to see that remain as a refinery.”

U.S. Bankruptcy Judge Kevin Gross had a tough decision to make. Last week, the Delaware judge delayed the confirmation hearing to give stakeholders more time to object to the plan. But on Thursday, he officially signed off on the plan. “I’m very much satisfied that the sale to Hilco is the highest bid and sale,” Judge Gross said. “Clearly is in the best interest of the community as well, given the risks that were attended to the prior operations with the refinery, and a refinery frankly that had numerous and repeated problems over the years.”

Grist thanks its sponsors. Become one.

As a result of yesterday’s hearing, Hilco is now set to buy the plot of land for $252 million, $12 million more than what was initially agreed upon. The final bankruptcy plan also includes $5 million in severance for laid-off refinery workers, as part of a larger settlement for all the refinery’s unsecured creditors. In addition, the plan will also pay PES executives as much as $20 million in bonuses on top of the millions of dollars in bonuses paid to them right after the refinery exploded last June.

Since the explosion, Philly Thrive — the grassroots environmental justice group that organized the protest of the auction — ramped up its efforts to organize and rally against the refinery for threatening public health. The group held several protests in front of the refinery, hosted call banks, wrote testimonies, and occupied government-owned buildings. Meanwhile, a report released last week found that the PES refinery, which processed 335,000 barrels of crude oil each day, released the highest levels of cancer-causing benzene pollution of any refinery in the country.

“Some people can’t afford to get up and move,” South Philadelphia resident Carol White, who lives about a mile away from the refinery and is also a member of Philly Thrive, told Grist after the June explosion. “There are older people living here inhaling fumes, newborn babies, kids under five, and ultimately, it’s impacted people of color.”

Philly Thrive’s months-long fight to end the refinery — along with its years-long fight to breathe clean air — have paid off. The PES refinery will now be permanently shut down and most likely be redeveloped as a mixed-use property. But the group said it’s not an end to the fight, and it looks forward to working with Hilco in determining the future of the land.

Grist thanks its sponsors. Become one.

“Thrive members are already seeing and planning for the next fight ahead of us, including holding Hilco to a process of involving the public around redevelopment, taking on measures to get whatever justice we can around the benzene emissions, and also linking up with efforts around a Green New Deal,” Philly Thrive organizer Alexa Ross told Grist. “This is not the end of the fight.”

Reader support helps sustain our work. Donate today to keep our climate news free.