Philadelphia Energy Solutions (PES) will retain 83 union workers as “caretakers” at its shuttered South Philadelphia refining complex after Sunday, the last official day for most employees. The bankrupt company is seeking to sell the refinery, the largest on the East Coast, which employed 1,100 people before it shut down abruptly after a June 21 fire and explosion.

PES, in a memorandum of understanding with United Steelworkers Local 10-1, said it would provide a “transition fund” of $2.8 million to be divided equally among union workers who were not kept on as caretakers. The laid-off employees will receive no severance, but the “transition” payments would amount to about $5,000 for each laid-off union worker — there were about 640 members of the Steelworkers employed at the plant before it shut down.

The agreement requires the approval of the U.S. Bankruptcy Court in Delaware, where PES Holdings LLC filed for bankruptcy in July. A company spokesman declined to comment on the agreement.

The agreement provides for relaxed work rules and allows supervisors to do some jobs traditionally assigned to union members. The goal is to encourage cooperative work to “place and maintain the refinery complex in a safe, ready condition to be restarted and rebuilt,” the agreement states. The company also told the union that “it is likely that layoffs will be permanent.”

Labor and political leaders mounted a campaign this week to call for the safe, secure closure of the refinery and a smooth transition to a new owner. While labor leaders hope another operator will rebuild and resume operations of the 335,000-barrel-a-day refinery, clean energy advocates and neighborhood activists are pressuring the city to put the 1,400-acre industrial site to a new use.

Employees will be paid through Sunday, but most of the workforce was let go on Tuesday and Wednesday, according to Ryan O’Callaghan, president of the union local.

When it announced the closure on June 26, just a few days after the fire, PES initially told workers their jobs would end on July 12 — but later agreed to keep most workers on until Aug. 25 to comply with the 60-day notice required under the state Worker Adjustment and Retraining Notification Act. Under this week’s agreement, the union agreed not to file a WARN Act complaint, and also settled most outstanding grievances.

Nearly all company benefits, including health insurance and life insurance, will be terminated at the end of the month. The 83 workers who are retained as caretakers, in addition to getting their regular hourly pay, will receive a retention bonus of $4,700 a month, or $1,087 for each week, presumably to compensate for benefits the company previously covered.

The skeleton work crew that will stay on will operate the boiler house that produces steam for the plant, operate the wastewater treatment plant, and complete the neutralization of hydrofluoric acid that was used in the alkylation unit that was destroyed in the June 21 fire. The employees will also work on completing the investigation of the fire and explosion, which is also being examined by federal investigators.

Much of the workforce gathered Thursday evening at Chickie’s & Pete’s in South Philadelphia to mark the end of an era at the refinery, where petroleum has been converted into fuel for about 150 years.