NEW YORK--Crude-oil prices pared earlier losses to trade near flat after weekly government data showed a larger-than-expected drop in oil supplies as refinery utilization increased.

Light, sweet crude for August delivery rose as high as $105.53 a barrel on the New York Mercantile Exchange after the data's release. Futures recently traded down 13 cents, or 0.1%, at $105.21 a barrel. Brent crude on ICE Futures Europe recently traded down 48 cents, or 0.4%, at $111.81 a barrel.

Crude-oil stockpiles decreased by 3.2 million barrels to 384.9 million barrels, the U.S. Energy Information Administration said Wednesday. Analysts had expected stocks to fall by 1.7 million barrels on the week, according to a Wall Street Journal survey.

Refining capacity utilization rose 2.9 points to 91.4% of capacity. Analysts had expected the operating rate to gain by 0.7 percentage point in the week.

Demand for crude oil typically rises at this time of year as refineries conclude seasonal maintenance and ramp up production ahead of the busy summer-driving season.

Oil prices have fallen for four straight sessions as an insurgency in Iraq seemed less likely to immediately threaten Iraqi oil exports.

However, traders who had bet on lower prices may be closing out those wagers, said Bill O'Grady, chief market strategist at Confluence Investment Management.

"If you've been short all week and you get a bullish number like this, it does encourage one to take...profits," especially heading into a long holiday weekend, Mr. O'Grady said.

Gasoline stockpiles fell by 1.2 million barrels to 213.7 million barrels, the EIA said in its weekly report. Analysts surveyed by The Wall Street Journal expected a 200,000-barrel increase.

"It's a friendly report for gasoline," Mr. O'Grady said.

Front-month August reformulated gasoline blendstock, or RBOB, rose as high as $3.0417 a gallon on the report. Prices recently traded down 0.4 cent, or 0.1%, at $3.0326 a gallon.

Distillate stocks, which include heating oil and diesel fuel, rose by 1 million barrels to 121.5 million barrels, compared with analysts' forecast of a gain of 800,000 barrels.

August diesel fell 1.52 cents, or 0.5%, to $2.9630 a gallon.