West Texas Intermediate oil rose $1.75, or 4.22%, to $43.22 a barrel.
Brent crude was up $1.61, or 3.63%, at $45.94 a barrel.
U.S. crude inventories fell 8.6 million barrels in the week to Aug. 1 to 520 million barrels, compared with analysts’ expectations for a 3 million barrel drop, the American Petroleum Institute found.
Official figures are due later on Wednesday.
“A bullish sentiment is justified initially today on the U.S. stocks news, but we believe bulls may need to take shelter back at the ranch in coming days, as COVID-19 takes again the centre stage,” Rystad Energy’s head of oil markets Bjornar Tonhaugen said.
Global coronavirus deaths surpassed 700,000 on Wednesday, according to a Reuters tally, with the United States, Brazil, India and Mexico leading the rise in fatalities.
“We see gasoline demand coming in close to 7% year-on-year lower through Q3, with gasoil/diesel registering a decline of some 4%, implying a continued slowdown of the recovery, with a global return to 2019 levels this year increasingly in doubt,” JBC Energy said.
The consultancy sees jet fuel demand at 50% lower through Q3 compared with last year.
Sentiment drew some support from signs talks between Democrats in Congress and the White House on a new coronavirus relief package are making progress, although the sides remain far apart.
U.S. factory data this week also showed an improvement in orders, which some analysts took as a hint of economic recovery.
Euro zone business activity returned to modest growth in July as some curbs imposed to stop the spread of the coronavirus eased, the Composite Purchasing Managers’ Index from IHS Markit showed on Wednesday.