In the days after a devastating fire closed the Philadelphia Energy Solutions refinery in South Philadelphia, wholesale gasoline prices shot up with the expected loss of fuel supplied by the East Coast’s largest refinery.

But a funny thing happened on the way to the gas station.

Pump prices have actually gone down since the June 21 refinery fire. After rising a nickel a gallon to $2.93 on Independence Day, the average gas price in Philadelphia has fallen to $2.81 a gallon, according to AAA.

Plenty of gasoline and diesel fuel has flowed into regional markets from overseas, and other parts of the country, to fill the void left by the closure of the 335,000-barrel-per-day refinery.

“A lot of imports have stepped in to take over, that’s one of the reasons we’ve seen little price impact,” said Kathleen Zinszer, a AAA fuel analyst.

While PES is responsible for about 5 percent of the East Coast’s gasoline production, it produces 30 to 40 percent of the region’s diesel and heating oil, according to the Oil Price Information Service -- and that could portend a supply crunch in the winter.

The abrupt closure of PES has left a big hole in South Philadelphia. PES Holdings LLC filed for bankruptcy in July and is looking for potential buyers to restart the complex, which is actually two conjoined refineries occupying more than 1,300 acres along the Schuylkill. Most of the refinery’s 1,100 employees were let go last week.

» READ MORE: Explosion-damaged South Philadelphia refinery files for bankruptcy, again

The region’s growing dependence on imported fuel carries some risks for future supply disruptions. And there’s the obvious loss of a thousand jobs, and the refinery’s $100 million annual payroll, on the region’s economy as a big share of local fuel production, and the jobs associated with it, migrates elsewhere.

But the ease with which products from Canada, Europe, India, and the U.S. mid-continent filled in after the refinery shutdown underscores the market weaknesses that led to the failure of PES, which was struggling financially before the fire. Any buyers who are considering operating PES as a conventional petroleum processing facility will encounter the same fundamental economic challenges, including competition from refiners in the Midwest and the Gulf Coast that have easier access to new sources of discounted domestic crude oil.

“This refinery is kind of doomed because of the changing landscape,” said Patrick DeHaan, a fuels analyst for

Labor and political leaders who are campaigning for a buyer to restart the refinery say the real test of the refinery’s closure will come this fall as the winter heating season ramps up. They said the loss of 40 percent of the region’s heating oil could drive up prices, creating hardship for homeowners and commercial customers who use heating oil as a backup fuel during cold stretches, when natural gas supplies are curtailed for some non-residential users.

“This is the largest refinery on the entire East Coast,” U.S. Rep. Brian Fitzpatrick said at a rally Monday of union workers. “Think about the supply issues.”

Potential winter shortages of heating oil could be magnified because of an impending change in regulations requiring all ocean-going vessels to emit less sulfur after Jan. 1, 2020. That new rule may divert large amounts of low-sulfur diesel and heating oil now used in trucking and in home furnaces, creating shortages and price spikes.

The new International Maritime Organization regulations, which reduce the allowable limit of sulfur in marine fuels from 3.5 percent to 0.5 percent by weight, have created such a demand for the cleaner-burning marine fuel that the world’s largest container-shipping company, Maersk, has signed up to buy low-sulfur fuel produced at an idle asphalt plant in Paulsboro, N.J.

PBF Logistics in October will begin to supply A.P. Moller-Maersk with low-sulfur fuel produced and blended at PBF’s Crown Point International site, according to S&P Global Platts. The terminal, a former asphalt plant that PBF acquired last year, is located near PBF’s Paulsboro refinery. PBF will supply about 10 percent of Maersk’s annual fuel from the plant.

» READ MORE: Philadelphia refinery was close to the financial brink before the June 21 fire and explosion

Several potential buyers who are said to be sniffing around the shuttered PES refinery in Philadelphia are also interested in serving the marine fuel market, including a Philadelphia biofuels producer that this week became the first company to publicly step forward and express an interest in PES.

The company, S.G. Preston Co., said it would modify the equipment to make renewable diesel, marine, and jet fuels from fats and oils. R. Delbert LeTang, founder and chief executive of S.G. Preston, said in an interview Friday that his company supplies biofuels to buyers under long-term contracts to satisfy renewable-fuel mandates, and is less vulnerable to the volatile prices and low margins that undid PES.

“The economics of the products we produce are better than conventional fuels,” LeTang said. S.G Preston signed an agreement in 2016 to supply JetBlue with 33 million gallons a year of jet fuel produced from 30 percent biofuel.

» READ MORE: Philly firm signs 10-year deal to provide biofuel for JetBlue aircraft

PES has attributed its financial woes to competition and the cost to comply with federal ethanol-blending mandates. PES is also disadvantaged because it is configured to use light, sweet crude, which is more expensive to buy than heavy crude, and produces more gasoline and less of the higher-profit fuels like diesel and fuel oil.

The refinery’s competition in regional markets is well-documented. Though PES is the largest refinery in the Northeast, the region is dependent upon fuels shipped in by pipeline from the U.S. Gulf Coast, and by ships from Europe, Canada, and increasingly, from India, where Reliance Industries operates the world’s largest refinery, which has a capacity nearly four times as big as PES.

Existing domestic pipelines provide only limited opportunities to expand service to Philadelphia. The Colonial Pipeline, which delivers fuel from Texas refineries across 10 southern states and terminates in Linden, N.J, operates at near capacity.

Buckeye Pipeline LP, which operates the Laurel pipeline across Pennsylvania, has been pushing to reverse flows on part of the pipeline to give Midwestern refiners more access to western and central Pennsylvania markets, at the expense of Philadelphia refiners. After PES announced its closure, Buckeye settled a lawsuit allowing more mid-continent fuel to flow into Pennsylvania, which should allow refiners from the Great Lakes to step into markets previously dominated by PES.

» READ MORE: Philly refinery closure paves the way for pipeline settlement. Midwestern refiners win, for now.