Four of the largest refineries in Texas are discovering widespread damage from the deep freeze that crippled the state and expect to be down for weeks of repairs, raising the potential for prolonged fuel shortages that could spread across the country. Exxon Mobil Corp.’s Baytown and Beaumont plants, Marathon Petroleum Corp.’s Galveston Bay refinery and Total SE’s Port Arthur facility all face at least several weeks to resume normal operations, people familiar with the situation said. Gasoline prices at the pump could reach $3 a gallon in May as long outages crimp supply ahead of the driving season, said Patrick DeHaan, head of petroleum analysis for retailer tracker GasBuddy.

The cold snap and power outages that roiled energy markets affected more than 20 oil refineries in Texas, Louisiana and Oklahoma. Crude-processing capacity fell by about 5.5 million barrels a day, according to Amrita Sen, chief oil analyst for consultant Energy Aspects Ltd.

As blackouts that left millions of homes in the dark end and frozen roadways thaw, drivers can take to the road again. But refineries are left with burst pipes, leaks, damaged equipment and, in some cases, petroleum fluids that hardened into a sort of wax because the flow stopped.

“It’s going to be a difficult restart for refiners,” said Andy Lipow, president of energy researcher Lipow Oil Associates in Houston. “They are not going to restart until power is restored and they get the go-ahead from the utilities. My guess is the earliest restarts would even begin is this coming weekend.”

Also See: Gasoline Use Plunged as Americans Hunkered Down During Cold Snap

Restarting a refinery isn’t like flipping a light switch when the power comes back on. In addition to fixing any damage, getting back online involves slowly heating up units, testing all the way, then slowly ramping up so they are running fluid again. And then, testing and retesting the output until it meets specifications.