The city was still shrouded in early morning darkness when something deeper and more ominous than a passing thunderstorm rippled across South and Southwest Philadelphia, driving people out of their beds.

One by one, residents darted to their windows and front steps, wondering if they’d discover some mundane explanation — a ruptured gas main, a blown transformer, an especially bad car wreck.

What they found was an apocalyptic vision.

“I could see it from my bedroom window,” said Matthew Terranova, 42. “Something that looked almost like a nuclear disaster.”

Terranova, an Amazon worker, was peering from his house at 28th and Porter Streets at the nearby Philadelphia Energy Solutions refinery, which was rocked by a series of powerful explosions about 4 a.m. Friday.

Passing motorists soon began sharing footage on social media of the blasts, which briefly obscured the refinery — a longtime source of controversy and concern for local residents and environmental activists — in a wall of fire.

The first explosion triggered car alarms in Jeanne Fortuna’s neighborhood, the Reserve at Packer Park. A second, louder one gave way to an unnerving scene. “The sky was orange,” said Fortuna, 55, “and a giant flame shot up in the air.”

So intense was the blaze that it showed up on satellite infrared images, according to the National Weather Service’s Key West, Fla., office. It left five people with minor injuries.

For some, the three-alarm fire and subsequent shelter-in-place messages from the city felt like the arrival of a nightmare they’ve feared for years. The oil refinery is the largest on the East Coast, and is essentially wedged into the backyards of several residential neighborhoods, where childhood asthma problems are common. Worries about a potential cataclysm run deep.

Sylvia Bennett, 75, has lived at 32nd and Dickinson Streets for 50 years, and remembers having to evacuate her house in the 1970s and ’80s because of large fires at the refinery.

A retired behavioral health worker, she is now a member of Philly Thrive, a group that speaks out about health concerns related to the refinery. The cause is personal; Bennett said two of her daughters have cancer, and she worries that their illnesses are linked to living so close to the complex.

When the explosions shook her bed on Friday morning, she feared the worst. “I thought, ‘We’re going to blow up.’”

Kilynn Johnson, a Philly Thrive member who also lives at 32nd and Dickinson, fielded an early morning phone call from her daughter, whose electricity had gone out in the aftermath of the explosions.

Johnson, 49, also traces her family’s health woes — she said was diagnosed with cancer three years ago, while her mother died from chronic obstructive pulmonary disease — to their proximity to the refinery.

“What will it take for them to realize this is hazardous?” she asked. “The pollution, and the chemicals, is really affecting our neighborhood, our community.”

City officials lifted the shelter-in-place advisory shortly after 7 a.m., and reopened the George C. Platt Memorial Bridge. The Health Department assured residents that preliminary air tests had found “no ambient carbon monoxide, hydrocarbons (combustibles), or hydrogen sulfides.”

Friday’s fire was the second at the refinery this month. Mayor Jim Kenney directed Managing Director Brian Abernathy and Fire Commissioner Adam Thiel to meet with Philadelphia Energy Solutions and its community advisory panel to address neighbors’ health and safety concerns.

“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,” he said.

A 2017 report from the NAACP and the National Medical Association and the Clear Air Task Force found that the refinery was responsible for 72 percent of toxic air emissions in Philadelphia, and identified ammonia, hydrogen cyanide, benzene, and sulfuric acid among the toxins that were released at that time from the complex.

The refinery was cited for violating its operating permit 24 times between 2013 and 2015, for infractions like higher-than-normal carbon dioxide emissions, and paid nearly $700,000 worth of settlements to the city, according to past reporting from Al Día.

Philly Thrive organizer Alexa Ross, who lives in Southwest Philadelphia, said she woke up Friday to “about 10 voicemails and calls” about the refinery explosion. “It was terrifying,” she said. “To hear people ... afraid for their lives, and afraid for their health and safety, is terrifying and is unacceptable.”

Residents in Siena Place, a development near Penrose Avenue, said they found ash on their cars and back patios when they went outside on Friday morning. In Packer Park, one woman said she found slivers of metal on her deck, and wondered if they were remnants of the explosions.

Some residents, though, seemed unfazed about living near the refinery.

Marc Ponte said he recently moved to 28th Street from a different part of South Philadelphia. “It’s quiet, which is great,” he said, adding that there is “lots of parking.”

Nancy Shapiro, a retired waitress who watched the blaze from her back window on 28th, said she co-exists peacefully with the refinery for the most part.

While she described her neighborhood as “ground zero,” she wasn’t concerned about being forced to evacuate. And she wouldn’t want to leave anyway. “I have too many cats for that,” strays and otherwise, she said.

Others were left to reevaluate what it means to live in the shadow of the refinery.

Terranova recounted how he moved to Porter Street about a year ago, drawn to the area by its affordability. The neighborhood seemed quiet, the refinery just a quirky part of its background.

“It didn’t really bother me much. I figured it was safe," he said.

"Apparently not.”