Oil prices jumped about 3 percent on Wednesday after the U.S. government reported a larger-than-expected gasoline inventory drawdown that offset a surprise build in crude stockpiles.
U.S. crude inventories rose 1.4 million barrels last week, compared with analysts' expectations for a decrease of 1.4 million barrels, the Energy Information Administration reported.
Gasoline stocks slumped by 3.3 million barrels, compared with forecasts for a 200,000-barrel drop.
Preliminary weekly production data indicated that U.S. output fell below 8.5 million barrels per day.
U.S. West Texas Intermediate (WTI) settled up $1.32, or 3.34 pct, at $40.83, and last traded up $1.37, or 3.47 percent, at $40.87 at 2:41 p.m. ET.
International Brent crude rose $1.33, or 3.18 percent, to $43.13 per barrel. It reached $41.51 on Tuesday, the lowest since April 18.
A bounce on the gasoline stock draw is no surprise, but the gains could be short-lived, said Tariq Zahir, trader in crude oil spreads at Tyche Capital Advisors in New York.
"The bottom line is the Street in the second quarter got a little ahead of itself in calling for rebalancing of supply-demand after Canadian and Nigerian supply disruptions. We are going into the third and fourth quarters with those supplies back online and refinery maintenance coming up," he said.
Brent crude rallied from 12-year lows of $27 in the first quarter to almost $53 in June, boosted initially by a failed OPEC plan to freeze output and later by supply disruptions in Canada to Nigeria and Libya.
But a global glut in motor fuels and other refined products since have stymied the rebound. Worries about slowing economies in Asia — the driver of oil demand growth — and Europe have weighed, along with near record-high OPEC output and signs of a new price war by Saudi Arabia for crude.
"The 3.3 million-barrel draw to gasoline stocks is likely a welcome surprise for refiners," said Troy Vincent, analyst at New York-based oil cargo tracker ClipperData. "But an unexpected, greater-than-1-million barrel build to crude stocks despite refinery utilization ticking higher by 0.9 percent should be cause for concern."
The glut has led many traders to predict lower prices going forth.
"We expect to see a little bit of price consolidation from here but our target really is for $35 WTI, which means any rebound you get will be more of a bear market correction," said Matthew Tuttle, chief executive of Tuttle Tactical Management in Riverside, Connecticut.
Goldman Sachs retained its 2017 forecast of $52.50 and near-term range of $45-$50 for WTI. But it added that oil's most recent decline came amid supportive factors such as the dollar weakening and refining margins for gasoline widening.
"It will take a strong reversal in positioning to create substantial new upside," Goldman said.
However, other analysts said recent price falls were overblown, with Citi saying bears, who speculate on falling prices, having "gone wild in oil at $40."
Standard Chartered bank said there was "no fundamental justification for recent oil-price falls" and "the global oil market has rebalanced, and U.S. crude supply and inventories are expected to fall.
— CNBC's Tom DiChristopher contributed to this report.