Goldman Sachs says 23 percent of U.S. refining capacity is shut.
Crude dips on expected fall in demand from refineries, while gasoline hits more than two-year high.
Oil prices fell and gasoline futures surged on Wednesday to another two-year high, as flooding and damage from Tropical Storm Harvey shut nearly a quarter of U.S. refinery capacity, curbing demand for crude while raising the risk of fuel shortages.
Refineries with output of 4.2 million barrels per day (bpd) were offline on Tuesday, representing nearly 23 percent of U.S. production, according to Reuters estimates and company reports. Restarting plants even under the best conditions can take a week or more.
"It will be a while before operations can return to normal and the U.S. refining industry is bracing itself for an extended shutdown," Stephen Brennock of oil broker PVM said.
U.S. gasoline futures were up 5 percent at $1.873 per gallon, having hit $1.9140, the highest level since July 2015. Diesel futures advanced by 1.7 percent to $1.6945 a gallon, having touched their highest since January at $1.7161.
On Wednesday, Valero said that due to flooding they were fully shutting their Port Arthur refinery.
While infrastructure restarts following the storm are expected to extend into the coming weeks, on Wednesday Marathon Petroleum Corp was restarting its Galveston Bay Refinery, said sources familiar with plant operations.
U.S. West Texas Intermediate crude ended Wednesday's session down 48 cents, or 1 percent, at $45.96. Brent crude futures, the international benchmark for crude trading, were down $1, or 1.9 percent, at $51 a barrel by 2:20 p.m. ET (1820 GMT).
The spread between Brent and U.S. crude hit its widest in more than two years, and was lately at $5.39 a barrel.
"Certainly the spread widening out between WTI/Brent is Harvey-driven. You've pretty much sapped a major chunk of Gulf Coast refining demand," said Anthony Scott, managing director of analytics at BTU Analytics in Denver.
Gains intensified for refined products after sources on Wednesday said Total's Port Arthur, Texas, refinery had been shut by a power outage resulting from the storm.
Gasoline margins jumped, as the gasoline crack spread jumped 12.5 percent to $23.45 a barrel, highest on a seasonal basis since 2012.
"Crude is always easier to replace than products," said Olivier Jakob, analyst at Petromatrix. "If the refineries stay shut for more than a week or 10 days, it's going to be very problematic."
Harvey made landfall on Friday as the most powerful hurricane to hit Texas in more than 50 years, resulting in the death of at least 17 people.
In addition to shutting oil refineries, about 1.4 million bpd of U.S. crude production has been disrupted, equivalent to 15 percent of total output, Goldman Sachs said.
On Wednesday industry sources told Reuters that Shell staff are reboarding the Perdido oil and gas platform in the Gulf of Mexico in preparation for a restart.
Still, effects of the damages and shutdowns are expected to ripple for weeks. Explorer shut two main lines carrying fuel to the Chicago market Tuesday, and the main Colonial Pipeline to the U.S. East Coast was running at reduced rates.
The market shrugged off weekly inventory figures from the U.S. Energy Department, which reflect stocks prior to the storm.
Crude inventories fell by 5.4 million barrels in the latest week, far more than the decrease of 1.9 million barrels analysts had expected. Refining capacity utilization rose to 96.6 percent, the highest since 2005, a figure that will fall sharply due to massive shut-ins on the Gulf.
West African crude differentials were steady as strong margins countered Harvey's impact.
— CNBC's Tom DiChristopher contributed to this report.