Crude-oil inventories fell unexpectedly last week after four straight gains, according to government data released Wednesday.
For the week ended May 16, crude-oil inventories fell by 5.4 million barrels, or 1.7 percent, to 320.4 million barrels, which were 6.5 percent below year-ago levels, the Energy Department's Energy Information Administration said in its weekly report.
Analysts expected a gain of 900,000 barrels, according to a survey by Platts, the energy research arm of McGraw-Hill Cos.
Gasoline inventories fell by 800,000 barrels, or 0.4 percent, to 209.4 million barrels, which were 4.9 percent above year-ago levels Analysts expected stockpiles of the motor fuel to grow by 500,000 barrels.
Demand for gasoline over the four weeks ended May 16 was about 0.6 percent lower than a year earlier, averaging 9.3 million barrels a day.
At the same time, U.S. refineries ran at 87.9 percent of total capacity on average, a gain of 1.3 percentage points. Analysts expected capacity to rise by only 0.6 percentage point.
Inventories of distillate fuel, which include diesel and heating oil, rose by 700,000 barrels to 107.8 million barrels for the week ended May 16. Analysts expected distillate stocks to rise by about 1.5 million barrels.
At the pump, gas prices rose about a penny overnight to a record high national average of $3.81 a gallon Wednesday, and are well above the year-ago average of $3.21 a gallon, according to AAA and the Oil Price Information Service. Diesel prices also set a record of $4.56 a gallon.
In morning trading, light, sweet crude for July delivery rose 74 cents to $129.72 a barrel on the New York Mercantile Exchange after earlier breaking the $130 threshold for the first time.