Comments from Saudi Arabia's oil minister that prices ought to stabilize from the selloff of recent months also helped put a floor under prices, dealers said.
Some drew encouragement from the Federal Reserve's Beige Book report anticipating cuts in capital expenditure for oil and gas producers in certain U.S. districts. Lower oil exploration budgets could mean less supply in the future.
U.S. crude <CLc1> settled up $1.01 at $51.53 a barrel, reversing a near $1 drop from earlier in the day.
Brent <LCOc1> finished down 47 cents at $60.55 a barrel, after falling more than $1.50 earlier.
Oil prices slid in early trade after U.S. Energy Information Administration data showed domestic crude stocks rose 10.3 million barrels last week, more than double the build forecast by analysts in a Reuters poll. It was the eighth straight week of record highs for total inventories. [EIA/S]
After a steep slide earlier in the week, losses on the U.S. data were somewhat muted as market bulls noted that stockpiles grew much less than expected in the Cushing, Oklahoma storage hub.
Within two hours of that data, prices bounced after Tehran's ambassador to the International Atomic Energy Agency, Reza Najafi, said no deal had been reached on the duration of any possible agreement covering Iran's nuclear program.
On Monday, Iran, in negotiations with six world powers, had rebuffed as "unacceptable" comments by U.S. President Barack Obama that any accord last at least a decade.
Brent tumbled 5 percent on Monday, amid fears that a quick nuclear deal could lift U.S. and other Western government sanctions on Tehran and flood the market with new oil exports.
"The market certainly seems to have jumped on the latest Iran news, after earlier pricing in a nuclear deal and removal of sanctions," said John Kilduff, partner at New York energy hedge fund Again Capital.
Saudi Oil Minister Ali al-Naimi said in a speech delivered in Berlin that he expected supply and demand of oil to reach a balance soon. His remarks came after a hike on Tuesday in official selling prices (OSPs) of Saudi crude delivered to Asia and the United States.
(Story has been refiled to fix typo in headline)
(Additional reporting by David Sheppard in London and Florence Tan in Singapore; Editing by Kevin Liffey, Chris Reese, Diane Craft and David Gregorio)
By Barani Krishnan