The refinery has long been mired in economic struggles. Sunoco’s plan to shutter the facility came after it failed to attract a buyer that could find a way to profit from the refinery, parts of which have been operating for 150 years. The 2012 deal involved the creation of a new corporate owner, Philadelphia Energy Solutions, that was a joint venture between the Carlyle Group, a Washington-based private equity firm, and Sunoco, which retained a minority share. The company declared bankruptcy in 2018, and a majority of the stock was taken over by Credit Suisse Asset Management and Halcyon Capital Management.