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."