Brent crude oil rose on Thursday, tracing gains in U.S. equities in late-session trading after U.S. data showed stronger-than-expected retail sales and a fall in jobless claims.
The positive data bolstered early gains in Brent crude and helped push U.S. crude into positive territory, before a late session rally led by gasoline futures sent prices higher.
U.S. retail sales increased 0.6 percent in May after edging up 0.1 percent in April. A separate report showed the number of Americans filing new claims for jobless benefits fell last week, nearing its lowest level in five years.
U.S. stocks climbed steadily throughout the session, with the Dow back above 15,000 and the Nasdaq and S&P 500 up 1 percent, after the stronger-than-expected economic data.
Front month July Brent crude, which expired on settlement on Thursday, rose 76 cents to settle at $104.25 a barrel, after falling as low as $102.75. The far more actively traded August contract settled up $1.39 at $104.95.
U.S. gasoline futures led gains across the oil complex, rising nearly 2 percent. Heating oil futures rose by over 1 percent throughout most of the day.
July U.S. oil rose 81 cents to settle at $96.69 a barrel. U.S. crude has posted gains in six of the last nine trading sessions. This steady push upwards has helped it break through a medium-term trendline that has been pressuring the market, traders said, noting $96.25-$96.35 had been a key area of resistance.
"The market finally broke out from that level, and then there was some follow-through," said Michael Korn, president of Skokie Energy in Princeton, New Jersey.
The market was also watching news that Kinder Morgan Energy Partners LP shut its 307,000 barrel per day Trans Mountain pipeline, which carries crude, refined and semi-refined products from Edmonton, Alberta to the port of Vancouver and Puget Sound, after a spill of around 12 barrels of oil was detected during routine maintenance work.
The company did not have a timeframe for restart of the line.
Early in the session, oil fell on reports indicating weak demand, including a lowered forecast for global economic growth this year by the World Bank.
"The demand picture is still very subdued at the moment," said Carsten Fritsch, analyst at Commerzbank.
On Wednesday, the International Energy Agency said modest economic growth was limiting oil demand worldwide, and some developed economies would see absolute declines in oil consumption in 2013.
Oil prices drew support from disruption to flows, although McGillian pointed out that with current stockpiles of oil, the market could "take a wait and see approach."
Libya is struggling to hold output stable, while supply of North Sea crude, which underpins Brent, is expected to drop more sharply than usual due to maintenance this summer.
Sudan said rebels based in South Sudan had attacked a pipeline in its Diffra oil field on Wednesday, causing an explosion and fire that lasted for several hours. An Army spokesman said the pipeline was being restored. (Additional reporting by Manash Goswami and Alex Lawler; Editing by Bernadette Baum, David Gregorio and Marguerita Choy)