U.S. crude oil futures ended slightly higher on Thursday, as gasoline rallied amid concerns that fuel supplies remain tight.
Traders also cited worries over Nigerian supply after a spate of recent rebel attacks.
On the New York Mercantile Exchange, June crude settled 26 cents, or 0.4% higher, at $61.81 a barrel , trading from $61.38 to $62.50.
In London, June Brent crude rose 59 cents, or 1.5%, to settle at $65.79 a barrel , moving from $65.19 to $66.34.
NYMEX June RBOB gasoline ended up 9.52 cents, or 4.3%, at $2.3261 a gallon . Near the close, it hit an intraday high of $2.335, which was the loftiest since $2.455 on April 30. The session low was $2.2445.
The crack spread surged to $35.89, rising from Wednesday's $32.15 close.
Wednesday's inventory report from the U.S. Energy Information Administration showed domestic gasoline stocks rising 400,000 barrels last week, the first build in 13 weeks.
In the previous 12 weeks, supplies had dropped 34.1 million barrels, or 15%, with a series of refinery glitches hobbling production.
Despite the stock build, "we feel that both production and imports have a long way to go on the upside before supply concerns will be able to ease at this critical time of the usage cycle," said Jim Ritterbusch, president of Ritterbusch & Associates in Galena, Illinois.
NYMEX June heating oil rose 4.67 cents, or 2.6%, to settle at $1.8625 a gallon , after trading from $1.8161 to $1.8705.
Distillate stocks gained 1.7 million barrels, with an increase in diesel fuel supply offsetting a slight decline in heating oil inventories.
"There's no end to the chatter about the situation in Nigeria potentially worsening, particularly after Eni's force majeure declaration yesterday," said John Kilduff, senior vice president at Man Financial.
"Also, tight gasoline inventory still has us firmly behind the eight ball heading into driving season, and that remains a major concern," Kilduff added.
In the Niger Delta, rebels took four oil workers hostage on Wednesday. On Tuesday, they blew up three oil pipelines belonging to Italy's Eni, halting output of 98,000 barrels per day, Eni said.
The EIA said Wednesday that crude oil stocks rose 5.6 million barrels, which pushed up domestic crude stocks to their highest level since the end of June 2006.
News that U.S. refiners were boosting purchases of Algerian crude oil this month was bearish for crude, said Aaron Kildow, a broker at Prudential Financial in New York.
Crude imports jumped 6.6% to 10.99 million bpd and domestic production rose, while refinery runs rose only 0.7 percentage point to 89% of capacity amid refinery starts, helping crude supplies rise.
Refineries continued to be hobbled by a series of glitches, keeping the overall runs rate rise modest.
"Refinery runs rose by 170,00 bpd, or 1.1%, last week ... impressive one might think, except that runs are still more than 1% short of where they were three weeks ago, and and are falling still further behind plan," said Jan Stuart, economist at UBS in New York.
Sources also mentioned refinery maintenance in Europe curbing the availability of cargoes to the United States.
"My reading of the small increase in (refinery) runs was that it was bullish, because it led to rather a minimal increase in gasoline inventory of only 400,000 barrels," said Nauman Barakat, senior vice president at Macquarie Futures USA.
Barakat added that the big surge in the crack spread, with runs remaining below 90%, was an indication that "refiners are still having problems coming out of their turnarounds, not because of economic reasons but because of operational issues."