That's likely to mean higher prices at the pump for drivers.
Light, sweet crude for August delivery gained 82 cents to $69.79 a barrel on the New York Mercantile Exchange after rising briefly to $70.09. The front month contract last settled above $70 on Aug. 31.
Retail gasoline prices held steady overnight at a national average price of $2.975 a gallon, according to AAA and the Oil Price Information Service. Gas prices had been falling steadily since their May 24 peak of $3.227 a gallon. Analysts have said pump prices could start rising again if gasoline inventories don't increase.
Gasoline futures for July rose 0.9 cent to $2.2636 a gallon on the Nymex. Brent crude for August delivery was unchanged at $70.53 a barrel on the ICE Futures exchange in London.
In other Nymex trading, July heating oil futures rose 0.74 cent to $2.032 a gallon, while natural gas prices for August delivery fell 7.7 cents to $7.006 per 1,000 cubic feet.
In its weekly inventory report on Wednesday, the U.S. Energy Department's Energy Information Administration said gasoline inventories dropped 700,000 barrels in the week ended June 22. Analysts polled by Dow Jones Newswires had expected a 1.1 million barrel gain.
"The market is reacting to the surprising result," said Victor Shum, an energy analyst with Purvin & Gertz in Singapore.
The EIA report also showed that crude oil supplies rose by 1.6 million barrels to 350.9 million barrels last week, above the average estimate of a 1 million barrel increase. Refinery utilization rebounded 1.8 percentage points to 89.4 percent, higher than estimates of a gain of 0.8 percentage points.
While an increase in oil inventories would seem to be a development that would send oil prices down, analysts have long said that oil prices follow gasoline futures. Oil trades higher in sympathy anytime something happens that affects gas supplies, analysts say.
The weekly petroleum supply snapshot has been watched closely during a spring and early summer, during which an unusually high number of refinery outages have led to high gasoline futures prices and record prices at the pump.
"Gasoline demand stays strong. While it is still early in the driving season, June demand has now moved close to the all-time record for any month," said Barclays Capital analyst Paul Horsnell.