Oil rose to a two-month high near $57 a barrel on Thursday, paced by a rally in gasoline as dealers focused on rising demand for transport fuels and a lack of new refineries to push up production. US crude futures settled up $1.01 to $56.58 a barrel after striking as high as $56.90, the highest since early April, and less than $1.40 from the record. London Brent rose 98 cents to $56.22.
The gains lifted oil's spike this year to nearly 30 percent, as surging demand for fuels like diesel and gasoline stretch the world's refining industry.
US gasoline led gains in the energy patch Thursday, jumping 3.53 cents to $1.5978 a gallon - bringing it closer in line with heating oil, which firmed 0.44 cent to $1.6255.
US gasoline demand tends to pick up in the summer as families take to the roads for vacations, and can account for more than 10 percent of world petroleum consumption.
While gasoline was in the spotlight Thursday, worries over demand for distillates like diesel and jet fuel have kept heating oil at an unseasonal premium over gasoline.
US demand for distillates is up 6.5 percent over the past four weeks compared with the previous year, more than double the growth in demand for gasoline.
Diesel demand is also running strong in the United States, Europe and China, triggering concerns consumer countries will be ill-prepared for winter - when demand peaks.
The gains Thursday add to strength after a US government report showed domestic crude inventories slipping unexpectedly last week as refiners ran near full-throttle.
US crude oil supplies fell 1.8 million barrels, but remain roughly 9 percent over last year's levels thanks to robust imports, according to the US Energy Information Administration.
The market also brushed off an Opec deal to raise formal production by 500,000 barrels per day (bpd), or 2 percent, starting July 1 and another 500,000 bpd of extra oil soon if prices remain high.
Members of the cartel said that refinery bottlenecks mean the deal is unlikely to reduce prices.
"We are ready to supply more crude," Saudi Arabia's oil minister, Ali al-Naimi, told Reuters. "But get us the customers."
He added, "There is no shortage of oil. It's there, what is driving the price is the inability to make the oil into products."
The United States, the world's largest energy consumer, has not built a new refinery since 1976.