US West Texas Intermediate (WTI) crude futures settled at $15.06 a barrel, jumping $2.72, or 22%. Brent crude futures settled at $22.54 a barrel, up $2.08, or 10.2%.
US crude oil inventories swelled by 9 million barrels last week to 527.6 million barrels, about 7 million barrels below their record high, the Energy Information Administration said. The build was slightly less than the 10.6 million-barrel rise analysts had expected in a Reuters poll.
"The crude oil number is a big number at the end of the day, but it's not as big of a number that we had for the last three weeks," said Bob Yawger, director of futures at Mizuho in New York. The slowing build has delayed US crude storage from filling to the brim, Yawger said, a scenario that would likely send prices plunging into negative territory again.
"The time to total crisis mode has been kicked down the road a little bit," he said.
The data included a notable drawdown in US gasoline stockpiles of 3.7 million barrels from record highs last week as a modest pickup in fuel demand offset a rebound in refinery output.
Gasoline demand over the past four weeks remained down 44% from a year earlier, but the drawdown suggested consumption declines may be leveling off. Overall fuel demand has dropped by 28% in the last four weeks.
While US storage is rapidly filling, crude production cuts by US shale producers - estimated by consultants Rystad Energy at 300,000 barrels per day (bpd) for May and June - should slow flows into tanks.
Regulators in Texas, the biggest US oil producing state, will vote on May 5 whether to enact output cuts. Officials in North Dakota and Oklahoma are also examining possible cuts.
That would add to production curbs of almost 10 million bpd agreed by the Organization of the Petroleum Exporting Countries and other large producers including Russia.
Prices also got a boost from hopes for a demand recovery as European countries including France and Spain, along with several US states planned to lift some lockdown restrictions soon. "As long as we see openings in the economy, we will not see plunges like we saw a week ago," said Gene McGillian, vice president of market research at Tradition Energy in Stamford, Connecticut.