By Nicole Friedman 

NEW YORK--Oil prices climbed Wednesday after inventory data showed that U.S. oil production fell last week for the first time since January.

However, stored supplies of crude oil continued to increase. Inventories rose for a 12th straight week to 471.4 million barrels, a record in weekly data, the U.S. Energy Information Administration said Wednesday.

Light, sweet oil for May delivery recently traded up $1.44, or 3%, to $49.04 a barrel on the New York Mercantile Exchange.

Brent, the global benchmark, rose $1.34, or 2.4%, to $56.45 a barrel on ICE Futures Europe.

Domestic crude-oil output fell by 36,000 barrels in the week ended March 27 to 9.4 million barrels, which is still near the highest level in decades. Production last fell on a weekly basis in the week ended Jan. 30.

"Perhaps this is the first sign of a leveling off of oil production in the U.S.," said Andy Lipow, president of Lipow Oil Associates in Houston.

Oil prices have plunged more than 50% since June as surging U.S. production helped push the global market into an oversupply. Energy companies have since announced large spending cuts, and the number of rigs drilling for oil in the U.S. has dropped sharply. But analysts say those pullbacks can take months to translate to lower oil output, since new technology and efficiency gains mean that producers can pump more oil from existing wells.

The weekly EIA data is often revised in monthly reports. In its latest monthly report released this week, the EIA reported that crude-oil production fell to 9.2 million barrels a day in January, from 9.3 million barrels a day in December.

"The market may be getting the sense now that we are seeing the effect of the decline in rig count and production figures," Mr. Lipow said. "It certainly may be the beginning of a trend."

Investors have become concerned in recent months about growing U.S. crude-oil stockpiles, especially in Cushing, Okla., the delivery point for the benchmark Nymex contract. Cushing supplies rose by 2.6 million barrels last week to 58.9 million barrels, the highest level on record, the EIA said.

If Cushing storage levels hit maximum capacity, that could weigh on prices as sellers competed to find buyers with space left to store oil. The EIA said in September that Cushing's working capacity is 70.8 million barrels.

Nationwide, last week's stockpile build was roughly in line with what analysts surveyed by The Wall Street Journal had expected.

"It's already a story everyone knows," said Elaine Levin, president of energy brokerage Powerhouse, of growing crude-oil inventories. "I still think it keeps a cap, at least in the short term, on how high this market can rally."

Gasoline stockpiles fell by 4.3 million barrels to 229.1 million barrels, the lowest level this year. Analysts had predicted stockpiles would fall by an average of 900,000 barrels.

Gasoline futures recently rose 2.7% to $1.8181 a gallon.

Distillate stocks, which include heating oil and diesel fuel, rose by 1.3 million barrels. Analysts had expected a 300,000-barrel weekly decrease.

Diesel futures rose 1.8% to $1.7393 a gallon.

Prices pared earlier losses after weaker-than-expected U.S. economic data weighed on the dollar. Oil is priced in dollars, so a weaker dollar makes oil more affordable to buyers using foreign currencies. Oil prices and the dollar have tracked each other closely in recent months.

Nuclear talks between Iran and six world powers missed the deadline for a preliminary agreement Tuesday. But officials remained hopeful that they could reach an agreement outlining elements of a final nuclear deal to be reached by June 30.

Oil-market participants are keeping a close watch on the negotiations because a deal could lead to the lifting of international sanctions on Iran, paving the way for more Iranian crude to flood an already oversupplied global market.

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

Subscribe to WSJ: http://online.wsj.com?mod=djnwires