By Nicole Friedman 

NEW YORK--Oil prices turned positive Wednesday after weekly inventory data showed an unexpected drop in U.S. crude-oil supplies.

Light, sweet crude for September delivery recently traded up 95 cents, or 2%, to $48.93 a barrel on the New York Mercantile Exchange. Brent, the global benchmark, rose 60 cents, or 1.1%, to $53.90 a barrel on ICE Futures Europe.

Domestic crude inventories fell by 4.2 million barrels to 459.7 million barrels last week, the U.S. Energy Information Administration said Wednesday. Analysts surveyed by The Wall Street Journal expected stockpiles to be unchanged in the week.

Though refineries processed less crude into gasoline and other fuels compared with the week before, crude-oil inventories still declined due to a drop in imports and production.

U.S. crude-oil production fell by 145,000 barrels a day to 9.4 million barrels a day, the largest one-week decline since October 2013. Excluding Alaska, which saw a small rise in output, the drop totaled 151,000 barrels a day.

"The most interesting thing is the pretty big adjustment downward in crude production," said Dominick Chirichella, analyst at the Energy Management Institute. "In general, I think it's an overall positive report."

The EIA's weekly production figures are based on a statistical model, not reported production.

Gasoline stockpiles fell by 400,000 barrels. Analysts had expected gasoline supplies to be unchanged.

Gasoline futures rose 0.3% to $1.8083 a gallon.

Diesel supplies rose by 2.6 million barrels, more than the 1.3-million-barrel increase that analysts had expected.

Diesel futures gained 0.6% to $1.6140 a gallon.

Total supplies of crude oil and petroleum product rose by 100,000 barrels in the week.

The Federal Reserve Open Market Committee is also expected to conclude its two-day policy meeting Wednesday. Market participants are watching for any clues about whether or when the Fed might move ahead with a plan to raise interest rates.

Write to Nicole Friedman at nicole.friedman@wsj.com