U.S. oil prices rose to a one-month high Wednesday after a government report showed a large drop in crude stockpiles when analysts were expecting a small increase.

Light, sweet crude for delivery in July gained $1.74, or 1.7%, to $104.07 a barrel on the New York Mercantile Exchange, the highest close since April 21. Brent crude futures on the ICE Futures Europe exchange ended 86 cents, or 0.8%, higher at $110.55 a barrel.

The U.S. Energy Information Administration said domestic oil stockpiles fell 7.2 million barrels in the week ended May 16, the biggest weekly decline in more than four months, while analysts surveyed by The Wall Street Journal expected an increase of 700,000 barrels. The drop was driven by a slide in imports of crude to a 17-year low, averaging 6.5 million barrels per day.

Analysts said the decline in imports was a reaction to surging oil production in the U.S. that has offset the need for foreign crude, and warned it was hard to draw bigger implications about price direction from a single week's data. U.S. crude stockpiles remain near record highs and domestic production could continue to add to supplies, the said.

"We feel that such a surprisingly large drop could easily be reversed during the next couple of weeks," research consultancy Ritterbusch and Associates said in a note. "We are not attaching major significance to today's decline."

Still, the report carried other bullish data for the market, including a continued decline in stockpiles at the key delivery point for the benchmark U.S. contract in Cushing, Okla. Inventory declines there over the course of the year have been a key driver for domestic oil prices.

"The market's having a hell of a reaction," said Stephen Schork, editor of industry trade publication The Schork Report. "I wouldn't be surprised if crude oil corrects lower after this run over the next couple days. But right now the bulls are making hay with it."

Commercial demand for crude oil usually rises this time of year as refiners bring units back up to full operation after seasonal maintenance, in time for the start of summer driving season. The decline in inventories is bullish for oil prices as U.S. refiners begin to process and reduce inventories that have stood at near-record levels this year.

The market had been bid up late Tuesday and early Wednesday after the industry trade group American Petroleum Institute released its inventory report showing a 10.3 million-barrel decline. The market held those gains and continued rising throughout the day after the U.S. government data were released.

Front-month June reformulated gasoline blendstock, or RBOB, settled three cents higher at $2.9942 a gallon on the Nymex. June diesel gained 0.4 cent to end at $2.9533 a gallon.