The sirens went off about 4 a.m. Friday at the Philadelphia Energy Solutions refinery, following a warning that crackled over radios — a leak had been detected in “Unit 433."

Unit 433 is an alkylation unit, one of several process units that convert crude oil into fuels and other products at PES, the East Coast’s largest refinery. The “Unit 433” name conveyed a special alarm to refinery workers.

The unit uses hydrogen fluoride as a catalyst, one of the most toxic materials handled in the refinery. In its gaseous state, it can drift beyond the refinery fence line and imperil the public.

Just seconds after the radio warning, the first of several explosions ripped through Unit 433, rattling the plant and lighting up the night sky. The fiery explosions, whose cause is unknown, injured five workers, unnerved the city, and caused gasoline markets to spike on speculation of fuel shortages.

“It looked like Armageddon,” said a veteran refinery worker, who was granted anonymity because he was not authorized to speak. “If that’s (hydrogen fluoride), we’re dead.”

City officials said that no hydrogen fluoride was released, a fortunate outcome considering the ferocity of the explosions that rocked the plant — the fire was not extinguished until Sunday afternoon — and the proximity of the hydrogen fluoride storage tank near Unit 433. The injured refinery workers were treated at the scene.

The city initially ordered residents to shelter in place, but no mention was made about hydrogen fluoride. In a worst-case scenario, according to the refinery’s risk management plan filed with federal regulators, a hydrogen fluoride gas cloud could travel seven miles in 10 minutes, involving 1.1 million residents in Pennsylvania and New Jersey. The toxin causes skin and respiratory irritation at low exposures. In large doses, it is fatal.

“My initial reaction was damn, this is bad,” Mayor Jim Kenney told NBC10 Saturday in his first comments since the explosions and fire.

The refinery’s use of hydrogen fluoride is likely to become a focus of investigators who will examine the events leading up to the explosions and how close the city came to a catastrophe. The United Steelworkers, which represents workers at the South Philadelphia refinery, has long called for the phaseout of hydrogen fluoride at U.S. refineries.

The city’s Fire Department and Office of Emergency Management on Saturday said that the PES accident is under review by the Occupational Safety and Health Administration, the Bureau of Alcohol, Tobacco, Firearms, and Explosives, the Fire Marshal’s Office, and the U.S. Chemical Safety and Hazard Investigation Board (CSB).

The CSB, which investigates industrial fires and explosions, says that 50 of the nation’s 150 refineries operate hydrogen fluoride alkylation units. The board in April called on the Environmental Protection Agency to revisit the effectiveness of existing regulations for hydrogen fluoride and whether there are safer technologies available for alkylation, which produces a blending agent that increases the octane levels of gasoline.

The CSB conducts “root cause” investigations of chemical accidents at industrial facilities but does not have the power to prosecute or fine violators. Its investigations typically take a year to 18 months to complete, Hillary Cohen, CSB’s spokesperson, said in an email Saturday.

“Root causes are usually deficiencies in safety management systems, but can be any factor that would have prevented the accident if that factor had not occurred,” Cohen said. "Other accident causes often involve equipment failures, human errors, unforeseen chemical reactions, or other hazards.”

The investigators may examine whether PES, which emerged from bankruptcy last year but has continued to struggle under a heavy debt and intense competitive pressures, properly maintained the refinery. The company’s majority owners are Credit Suisse Asset Management and Halcyon Capital Management, which were the largest creditors of the bankrupt predecessor.

Cohen said it was too early to comment whether the investigation would focus on the risk of an hydrogen fluoride release, but the board issued its call to reevaluate hydrogen fluoride after investigating recent refinery accidents in Wisconsin and California that involved near misses with hydrogen fluoride releases.

Local officials in Superior last year ordered an evacuation of much of the city of 27,000 when an explosion and raging fire at a Husky Energy refinery threatened a storage tank containing 15,000 pounds of hydrogen fluoride. Nearly four hours into the evacuation, the News Tribune was first to question Husky and government officials about hydrogen fluoride. A Superior Fire Department official confirmed to the News Tribune that evacuations were based on the "worst-case scenario" — a rupture of the hydrogen fluoride tank that could have caused a toxic cloud of gas for miles downwind.

While no hydrogen fluoride was released during the incident and the fire never reached the hydrogen fluoride — which was 150 feet away from the location of the explosion — shrapnel was flung 200 feet, the Chemical Safety Board said.

Thirty-six people sought medical attention, including 11 refinery and contract workers. Superior Mayor Jim Paine and Duluth Mayor Emily Larson called on Husky to switch away from hydrogen fluoride. But Husky Energy announced in April it plans to rebuild the refinery and continue to use hydrogen fluoride when it resumes operations in late 2020.

In a 2015 accident at a Torrance, Calif., refinery, the CSB discovered that a large piece of debris from an explosion narrowly missed hitting a tank containing tens of thousands of pounds of modified hydrofluoric acid, or MHF.

ExxonMobil, the owner-operator of the refinery at the time, has resisted CSB’s requests for information detailing safeguards to prevent or mitigate a release of MHF, the agency said in a 2017 report. The oil company and the CSB are engaged in federal litigation over whether the agency’s jurisdiction extends to “near misses.”

The Torrance refinery is now owned by PBF Energy of New Jersey, which owns refineries in Paulsboro and in Delaware City, Del.

PES is required to file a risk management plan every five years with the EPA. In the publicly available portion of the most recent plan filed in 2017, which The Inquirer reviewed on Friday, the refinery identified hydrogen fluoride used in Unit 433 as one of the most toxic materials at the plant.

A small release of hydrogen fluoride would likely not get beyond the boundaries of the 1,300-acre refinery. But a worst-case loss of 71 tons of the gas would cause a cloud that would extend more than seven miles, potentially exposing a population of 1,098,799.

Refinery workers are well-acquainted with the risks of hydrogen fluoride. The refinery’s previous owner, Sunoco, was cited by OSHA in 2009 for four “serious” violations after a release of 22 pounds of hydrogen fluoride sent 13 contract workers to the hospital for “precautionary” medical treatment.

Ironically, the workers were sickened while working on a $125 million project to upgrade safety features on the hydrogen fluoride alkylation unit to use a less volatile form of hydrogen fluoride to reduce the risk of a hydrogen fluoride cloud during a catastrophic failure. The improvements also include new equipment to drain the alkylation unit in seven minutes if it springs a leak, averting disaster.

The PES complex is actually two refineries — one that the Atlantic Refining Co. opened in 1870 at Point Breeze and the other that Gulf Oil Corp. opened at Girard Point in 1926. Each has an alkylation unit.

Unit 433, the Girard Point alkylation unit that uses hydrogen fluoride and was involved in Friday’s fire, was built about 40 years ago. The Point Breeze refinery’s alkylation unit uses sulfuric acid as a catalyst. Sulfuric acid is less hazardous but is required in far larger quantities to achieve the same result. The materials are not interchangeable — an alkylation unit is designed to use only one catalyst.

Refinery owners are reluctant to commit to sulfuric acid catalysts because it costs more and generates more waste. In a 2009 interview, the Sunoco refinery manager said the Point Breeze sulfuric alkylation unit requires two tanker loads of acid each day, compared with one delivery a week of hydrogen fluoride. Hydrogen fluoride also produces an alkylate with slightly higher octane.

The CSB, in its letter to the EPA calling for a review of hydrogen fluoride, said new alkylation technologies are under development that may have inherent safety advantages.

“These include a solid-state technology and an ionic liquid technology, both of which are currently being planned to replace existing (hydrogen fluoride) alkylation units in at least two US. refineries," the board said.

The Duluth News Tribune contributed to this report.