Crude futures settled little changed on Friday after data showed the U.S. oil rig count barely rose this week, allaying fears of an acceleration in drilling that could bring on a surfeit of new supply to the market.
Oil had been volatile most of the session.
Continue Reading Below
The market moved up after a rally in Chinese equities in Asian trading overnight and after optimism Greece may have a bailout deal by the weekend. A weak dollar also boosted crude futures.
But a slump in gasoline prices, worries about a potential Iranian nuclear deal and the International Energy Agency's (IEA) forecast of weaker oil demand eventually pulled crude lower.
Industry firm Baker Hughes said U.S. energy firms added five oil rigs this week, the second week of increases in a row, after 29 consecutive weeks of declines.
"We expect rig counts to stay at current levels for the considerable future," said Chris Jarvis, analyst at Caprock Risk Management in Frederick, Maryland.
U.S. crude futures settled down 4 cents at $52.74 a barrel. It rose more than $1 at its height and fell nearly 80 cents at its low.
Brent crude, the more important global benchmark, settled up 12 cents, or 0.2 percent, at $58.573 a barrel. Brent jumped 3 percent on Thursday, rebounding from three-month lows.
Gasoline futures, which have led U.S. crude for weeks on bets of runaway fuel demand for the peak summer driving season, fell 1.4 percent on profit-taking after three straight days of gains.
In Tehran, Ali Akbar Velayati, top adviser to Iran's Supreme Leader Ayatollah Ali Khamenei, said his country had no intention to abandon nuclear talks with the United States and other world powers aimed at lifting sanctions on its crude exports. The negotiations expired on Friday without a deal.
"The prospects on a Greece bailout is encouraging but we're down on anticipation that an Iran deal may also get done," said David Thompson, executive vice president at Powerhouse, an energy-specialized commodities broker in Washington.
Greece put a cash-for-reforms proposal in front of creditors, raising the possibility that a deal could be reached this weekend.
China, the world's No. 2 oil consumer, saw the second day of a stock market surge with equity prices rising more than 5 percent after a barrage of government support measures.
International energy watchdog IEA said it expected global demand growth to slow next year to 1.2 million barrels per day from 1.4 million this year.
(By Barani Krishnan; Additional reporting by Simon Falush in London; Editing by Marguerita Choy and Andrew Hay)