Gasoline spiked to a more-than-two-year high on Thursday after a report that the largest U.S. refinery could remain offline for up to two weeks due to impacts from Tropical Depression Harvey.
Meanwhile, U.S. crude oil prices posted the steepest monthly loss since March as concerns spread over falling demand in the world's top oil-consuming country after Harvey knocked out almost a quarter of its refineries.
U.S. gasoline futures were up 13.7 percent at $2.1426 per gallon by 2:29 p.m. ET, after peaking at $2.1678, the highest level since June, 2015. The contract was on track for its biggest one-day gain since March, 2016.
Motiva Enterprises' Port Arthur, Texas refinery, the nation's largest, may be shut as long as two weeks for assessment of the plant and repair of any damage, sources familiar with plant operations said on Thursday.
In a statement, Motiva said, "Given the unprecedented flooding in the city of Port Arthur, it remains uncertain how quickly the flood waters will recede, so we cannot provide a timeline for restart at this time."
Uncertainty at the Motiva plant is likely coloring the market's outlook for the entire Beaumont and Port Arthur area, which is home to 8.5 percent of total U.S. refining capacity, said Andrew Lipow, president of Lipow Oil Associates.
"That two weeks could become four. They're thinking Motiva and they're thinking everyone else in Beaumont, Port Arthur," he told CNBC.
Critical pipelines were unable to receive fuel supplies from shuttered refineries, raising the prospect of gasoline price spikes during the Labor Day holiday, when many Americans take to the road.
Despite the surge in spot prices tied to the September contract, which expires on Thursday, there was far more trading volume in contracts for future deliveries, where price gains were more subdued.
"While we're showing spot up 15 percent, the second month is only up 7.5 percent ," said Joe Terranova, chief market strategist at Virtus Investment Partners. "If you go out six months, it's only up 1.5 percent. So this is a front-month dynamic."
Harvey, which brought record flooding to the U.S. oil heartland of Texas and killed at least 35 people, has paralyzed at least 4.4 million barrels per day (bpd) of refining capacity, according to company reports and Reuters estimates.
Crude markets recovered strongly after sharp losses in the previous session.
U.S. West Texas Intermediate (WTI) crude futures ended Thursday's session up $1.27, or 2.8 percent, at $47.23 per barrel. However, the contract ended August down 5.9 percent, marking a fifth monthly decline in six months.
International Brent crude rose $1.49, or 2.9 percent, to $52.35 a barrel. The contract fell by over 2 percent during the previous session.
The refinery outages have significantly reduced crude oil demand in the United States, so the price gains may be due to traders covering bets that crude prices will fall, said Tom Kloza, global head of energy analysis at Oil Price Information Service.
"There is 3-4 million barrels a day less crude oil demand right now for a temporary basis in the United States, so the crude oil rally ... makes no sense in terms of the actual landscape for the month or so," he told CNBC's "Fast Money: Halftime Report."
U.S. crude and product stocks, typically watched closely by oil investors as they reflect market balancing, were largely ignored this week.
U.S. commercial crude stocks fell by 5.39 million barrels last week to 457.77 million barrels, the U.S. Energy Information Administration said on Wednesday.
That's down 14.5 percent from record levels reached in March.
At the same time, the amount of crude entered into refineries reached a record high of 17.73 million bpd, the data showed, a number that is expected to have dropped dramatically this week due to infrastructure closures.
Analysts at JBC Energy said that figure could slip to as low as 15-16 million bpd.
— Reuters contributed to this report.