By Barani Krishnan
NEW YORK (Reuters) - Oil rebounded sharply on Thursday from three-month lows hit earlier this week, with prices up nearly 3 percent as China's collapsing stock market steadied and oil traders remained uncertain about negotiations for a nuclear deal that will allow Iran to export more crude.
Bets of strong gasoline demand through the U.S. summer driving season fuelled some of the rally. Gasoline prices gained more than 2 percent.
"We're up on a host of headlines and the natural rebound that follows a massive sell-off," said Donald Morton, who runs an energy-trading desk at investment bank Herbert J. Sims & Coin in Fairfield, Connecticut.
Brent crude settled up $1.56, or 2.7 percent, at $58.61 a barrel. On Monday, Brent hit a three-month low of $55.10.
U.S. crude settled up $1.13, or 2.2 percent at $52.78. This week's low of $50.58 was the lowest since April.
In early trade, oil rose after Chinese equities rebounded 6 percent on Beijing's frantic attempts to staunch a sell-off that has roiled global markets.
"China is really the house of cards for commodities, particularly oil and metals. Both can collapse anytime there's trouble with the economy there," said Chris Jarvis, analyst at Caprock Risk Management in Frederick, Maryland.
U.S. crude and copper tumbled about 8 percent each between Monday and Tuesday at the height of China's market collapse.
In Vienna, negotiators for a nuclear accord between Iran and world powers gave themselves more time as the talks stretched into a ninth day beyond their June 30 deadline. The White House said it will not be rushed into making a deal, but cautioned that Tehran had to make tough choices or risk a collapse in the talks.
Iran is seeking to revive oil exports that have dropped from 2.5 million barrels per day in 2011 to about 1 million bpd in 2014 due to Western sanctions arising from its nuclear program.
Negotiators hope to have a deal by Friday dawn in Vienna (0500 BST). If an agreement is not reached by then, the U.S. Congress will have extra time to review the talks. President Barack Obama's administration worries this could make it easier for the Republican majority in Congress to derail the negotiations.
"We could have a lot more volatility on Friday, if this keeps hanging over our heads," said Tariq Zahir, an oil bear at Tyche Capital Advisors in Laurel Hollow in New York.