Brent crude futures settled up $1.42, or about 4%, at $41.07 a barrel.
US crude futures finished up $1.79, or 5%, at $38.29 a barrel after hitting a three-month high of $38.51.
The US Energy Information Administration said crude stockpiles rose 3.9 million barrels last week to reach nearly 522 million barrels, in its fourth week of building to record highs.
But petrol inventories fell 4.5 million barrels, nearly triple forecasts, in the largest weekly draw in almost two years.
US petrol demand over past four weeks was 7% higher than a year ago, the EIA said.
"Gasoline is the star of the show today," said Matt Smith, director of commodity research at New York-headquartered energy data provider ClipperData.
"Ongoing strength in demand has yielded a large draw to gasoline inventories despite a rebound in refinery runs."
US petrol futures hit six-month highs, rallying 6%. The crack spread for gasoline, a measure of profit margin refiners get for turning a barrel of crude into the motor fuel, scaled seven-month highs.
Oil has gained about 50% from 12-year lows hit less than two months ago, since Opec members Saudi Arabia, Qatar and Venezuela, along with non-Opec exporter Russia, pledged to leave supply at January's levels if others cooperated.
Some analysts said the rally was excessive.
"We feel that values could consolidate well into next week or longer, prior to enough momentum shift to force an ultimate $9-10 crude price cut," said Jim Ritterbusch at Chicago-based oil advisory firm Ritterbusch & Associates.
Energy consultancy Wood Mackenzie said it expected this year's average price of crude to be lower than last year's, reflecting the glut.
Oil rallied earlier in the day after an Iraqi oil official told a state newspaper that producers in and outside of Opec plan to meet in Moscow on 20 March to discuss the output freeze. Russia's energy ministry, however, said no date or place had been set.
Credit ratings agency Moody's warned of more output declines if oil producers defaulted on debt because of low prices. Reuters exclusively reported that Saudi Arabia was seeking its first significant foreign borrowing in over a decade to help cover a record budget deficit from weak crude prices.
By Reuters
- UPSTREAMONLINE.COM