Benchmark West Texas Intermediate crude for August delivery rose 91 cents at $98.34 per barrel on the New York Mercantile Exchange. Brent crude, which is used to price many foreign oil varieties, gained $1.39 at $118.34 per barrel on the ICE Futures exchange in London.
The Energy Information Administration said that crude supplies dropped by 3.1 million barrels last week, a million barrels more than the decline that analysts forecast in a survey by Platts, the energy-information arm of McGraw Hill Cos. The EIA also said that oil and gasoline demand fell 1.5 percent and 0.9 percent, respectively.
Oil got an extra boost from Federal Reserve Chairman Ben Bernanke, who said Wednesday that the central bank may provide more stimulus if the economy's current soft patch persists. Government stimulus spending has weakened the dollar in the past, and that pushes investor money to commodities like oil. Oil, which is priced in dollars, tends to rise as the greenback falls and makes crude cheaper for investors holding foreign money.
The dollar fell against the euro and other major currencies after Bernanke's remarks.
Meanwhile, China said its economy grew in the second quarter by 9.5 percent, which is the upper end of analysts' forecasts. China is expected to drive world oil demand this year to the highest levels ever.
The International Energy Agency increased its estimates for world oil demand on Wednesday. The IEA raised its 2011 outlook by 250,000 barrels per day to a record 89.5 million barrels per day. IEA's estimate is higher than those from EIA and OPEC. On Tuesday both cut expectations for demand growth, citing high fuel prices and uncertainty about the global economy.
Average gas prices rose a penny overnight to $3.645 per gallon, according to AAA, Wright Express and Oil Price Information Service. A gallon of regular is 5.8 cents cheaper than a month ago but 93.2 cents more expensive than the same time last year.
In other Nymex trading for August contracts, heating oil added 2 cents at $3.111 per gallon and gasoline futures gained 5 cents at $3.1523 per gallon. Natural gas rose 8 cents to $4.396 per 1,000 cubic feet.