Brent crude futures climbed back into positive territory in late trading on Wednesday, snapping five days of losses after approval of a bailout payment to Greece eased worries about euro zone debt.
Oversold conditions in recent days after an extended drop in prices sent crude futures down as much as 8.6 percent since May 2 also attracted bargain hunters, analysts said.
Trading was choppy all day with oil finding balancing news of a North Sea oilfield shutdown, a U.S. refinery snag and a drop in U.S. refined product inventories against concerns about a potential Greek debt deal.
The stock market pared losses and Brent crude turned positive after euro zone governments agreed to authorize a payment of 5.2 billion euros from the region's bailout fund, despite opposition from some member states following inconclusive Greek election results.
The crisis has stirred concern about fuel demand in developed economies, and a string of poor economic data from Europe and the United States have added to worries.
ICE June Brent crude settled in London at $113.20 a barrel, rising 47 cents, after falling to a session low of $111.31 early.
"Brent keeps stalling and finding resistance trying to get back to its 200-day moving average and U.S. crude is running into support and can't make a decisive move below its 200-day average," said Stephen Schork, president of the Schork Group in Villanova, Pennsylvania.
U.S. June crude dipped 20 cents to close at $96.81, falling for the sixth straight session. Losses were limited as it found support at the 200-day moving average of $96.29.
In six sessions, front-month U.S. crude has fallen $9.25 or 8.8 percent, its biggest six-day loss since Sept. 23 last year
Trading volumes were modestly higher, rising 13 percent above the 30-day averages, with Brent crude trading picking up speed late in the day, according to Reuters data.
As Brent crude rose, its premium against U.S. crude widened further, closing at $16.39, from $15.72 on Tuesday. <CL-LCO1=R> The premium has been on the rise for five straight days.
Oil has fallen sharply in recent weeks. It had risen to 2012 highs above $128 a barrel in early March due to a string of production outages across the globe and concerns about a potential large scale disruption of Iranian exports due to Western sanctions.
"Crude futures have sold off so strongly in recent days and the oversold conditions are inducing some people to buy in," said Matt Smith, analyst at Summit Energy in Louisville, Kentucky.
Technical indicators also showed signs the market may be due for an upward correction. In London, Brent crude's 14-day Relative Strength Index (RSI) dropped to 26.62. On Friday, it crossed below the 30 threshold that typically signals oversold conditions.
U.S. crude's RSI rose back to 30 in early afternoon trading, after falling to 29.37 around midday.
Oil found more support from U.S. oil inventory data, which showed steep drawdowns in gasoline and distillate stockpiles in the week to May 4, which offset the seventh straight week of builds in crude stocks.
The European gasoil contract led the oil complex higher, up $13 at $967.25 a tonne as backwardation at the front of the curve widened further, which encouraged traders to continue drawing down supplies on storage.
U.S. inventories of distillate fell unexpectedly last week, off 3.25 million barrels, while gasoline stockpiles fell by 2.61 million barrels, well over analysts' expectations.
Traders reported midmorning that oil prices received support from the shutdown of the North Sea Buzzard oilfield, which has had production problems since last year.
An upset at Alon USA Energy's refinery in Big Spring Texas, involving a crude distillate unit also added support.
U.S. weekly jobless claims data will be released on Thursday and will offer signs of how the U.S. jobs market is faring. The forecast in a Reuters poll calls for a slight rise in initial jobless claims filings to 369,000 in the week to May 5, from 365,000 the week before.
Also awaited is China's April trade data, with forecasts expected to show exports stabilizing as imports increase. Analysts said this should point to a gradual recovery, thanks to Beijing's pro-growth policies adopted after a recent slowdown.
(Additional reporting by Robert Gibbons in New York, Julia Payne and Simon Falush in London; Editing by Bob Burgdorfer and David Gregorio and Alden Bentley)