A series of explosions and a massive fire ripped through a South Philadelphia oil refinery early Friday, injuring five workers.

Firefighters contained the blaze at Philadelphia Energy Solutions (PES) within a couple hours, but it was still burning Friday evening.

The blaze was not yet cool enough for firefighters to safely turn off the refinery’s main valve — meaning that a mix of butane and propane continued to fuel the fire, Deputy Fire Commissioner Craig Murphy told reporters Friday afternoon.

“If we put the fire out [before shutting off the fuel source], it’s a greater risk to let the product into the atmosphere,” Murphy said.

Murphy said Friday he did not know how long it would take before officials are able to safely access the valve.

City health spokesman James Garrow said the city took air quality samples both up- and downwind of the refinery. The samples were taken to the city’s Air Management Service Laboratory and were tested for 61 different chemical compounds, none of which were found to be at “or even near” harmful levels.

The workers suffered minor injuries and were treated at the scene, according to PES and the city.

Residents were advised to shelter-in-place for several hours early Friday morning, and the Platt Bridge was temporarily closed.

“Those who live and work in close proximity to the refinery and all Philadelphians have our word — we are firmly committed to ensuring the safe operation of the refinery, and the safety of those in its vicinity,” Mayor Jim Kenney said in a statement today.

Meanwhile, wholesale gasoline prices surged 3.7 percent Friday in New York on speculation that the PES outage might curtail regional fuel supplies. PES can process 335,000 barrels of crude oil a day, about 14 million gallons.

Fire and explosions

The blast was reported about 4 a.m and arriving firefighters found PES’s own fire crews battling the blaze, Murphy said.

Cosmo Servidio, Environmental Protection Agency head for Mid-Atlantic, said the incident began in a propane tank, and “no other tanks were affected.”

The fire quickly escalated to a third alarm.

PES said there were three separate explosions that “impacted” a unit that produces alkylate, which is used to boost gasoline octane.

The refinery complex has two alkylation units, and the Girard Point unit that appears to have been involved in the conflagration uses deadly hydrogen fluoride as a catalyst. HF releases have been implicated in several dangerous refinery incidents, including a 2009 release at the South Philadelphia refinery that sent 13 contract workers to the hospital.

Murphy said no known hydrogen fluoride, which is also known as hydrofluoric acid, was released in Friday’s accident.

The cause of the explosion is not yet known.

“The Fire Marshal’s Office will investigate the cause and origin of the fire once the incident is over and the scene is safe to enter. But the investigation will take time. For now, this remains a dynamic situation,” Fire Commissioner Adam Thiel said Friday afternoon.

All employees at the plant when the blast occurred have been accounted for, PES said.

Locator map of the explosion and fire at the Philadelphia Energy Solutions refinery in South Philadelphia

An “emergency response plan” was activated at the refining complex after the explosion, and responders from the company, as well as the Philadelphia Fire Department, were on the scene, said Cherice Corley, a PES spokesperson. Philadelphia police handled road closures.

The fire department supported the refinery team’s operations, Murphy said, keeping the fire contained to the alkylation unit and cooling surrounding pipes and tanks with water. He said 120 Philadelphia firefighters and 51 pieces of equipment were involved in the operation.

“It is standard practice when fighting a fire of this type to let the flammable gases burn away in a controlled fashion,” Thiel said.

The refinery was the scene of a smaller fire that PES said was quickly contained on June 10. There were no injuries in that incident.

Kenney said in a statement that he spoke today with PES leadership, as well as the fire department and Managing Director’s Office, and “was assured that the two incidents are unrelated in their nature and cause” and was informed of the speed that notifications went to nearby residents.

“Still, I believe that there is room for improvement, both in the operation of the refinery in light of two fires in as many weeks, and in the communication to residents,” he said.

Thiel and Managing Director Brian Abernathy will convene a working group with PES leadership and members of its Community Advisory Panel.

“A particular focus will be ensuring that air quality questions during such incidents are addressed immediately and communicated effectively to residents,” Kenney said.

Air quality

The EPA worked with the state and city to set up “fence line” air monitors “along the perimeter” of the refinery and possibly in the community to keep a check on air quality, Servidio said.

Monitoring produced normal readings for explosives, carbon monoxide, oxygen and hydrogen sulfide, a dangerous gas, the company said.

“The Health Department has no findings that would point to any immediate danger in the surrounding community at this time, and the city is NOT recommending evacuation or shelter-in-place,” spokesman James Garrow said in a statement.

Winds from the southwest at about 5 mph during the Friday morning commute blew smoke in the direction of the Walt Whitman Bridge, toward Camden and Gloucester City.

Samples from up- and down-wind of the refinery were taken to the Air Management Service Laboratory. The samples were tested for 61 different chemical compounds, none of which were found to be at “or even near” harmful levels.

‘It was jarring’

David Masur, executive director of PennEnvironment, a nonprofit environmental group, lives about a mile from the refinery.

“I was woken up by three loud boom, boom, booms. I thought an electric transformer in the neighborhood had exploded,” he said. “It was jarring. I have two young kids in the house.”

Masur said he was concerned about any pollutants or toxins and their impacts on nearby neighborhoods.

“If I live about a mile away and could hear it in the dead of night, you can imagine what it’s like if you lived next door and the impact on local families,” he said. “And certainly you have to think about the first responders. They have to show up and do their job. They don’t know what to expect or what they’ll be exposed to.”

An oil refinery in the city

An oil refinery converts crude oil into a range of petroleum products, including gasoline, diesel and heating oil. A refinery has a number of different units through which oil is processed under high pressure and high heat, so it is an inherently hazardous place.

Independent refiners like PES have been under fierce competitive pressure, which intensified recently when the EPA approved sales of gasoline containing 15 percent ethanol year-round, instead of just eight months a year. Oil refiners say the ethanol mandate increases their costs.

PES, the largest and oldest refinery on the U.S. East Coast, emerged from bankruptcy last year but has continued to struggle under a heavy debt. Its management team has been reshuffled in recent months.

A University of Pennsylvania report in September warned that the troubled South Philadelphia refinery complex may be shut down in the next few years and that the city should prepare to deal with a 1,300-acre industrial property fouled by more than a century of fuel production.

The PES complex is actually two refineries — the Atlantic Refining Co. opened in 1870 at Point Breeze and Gulf Oil Corp. opened an adjacent facility at Girard Point in 1926. Sunoco acquired the plants in 1988 and 1994.

Sunoco formed a joint venture in 2012 with private-equity firm, the Carlyle Group. The joint venture declared bankruptcy in January 2018, and completed the $635 million financial restructuring Aug. 7.

The two largest creditors, Credit Suisse Asset Management and Halcyon Capital Management, now hold about 70 percent of the shares in the new company. Carlyle and Energy Transfer Partners LP, Sunoco’s parent, have a combined 25 percent minority share.

Staff writers Claudia Vargas, Laura McCrystal, Maddie Hanna, Jonathan Lai, Oona Goodin-Smith and Frank Kummer contributed to this story.

READ MORE: Blocks away from South Philly refinery explosion, residents saw what looked ‘almost like a nuclear disaster’