Oil prices rose on Thursday in an up-and-down session, lifted by news that Saudi Arabia had cut production to meet OPEC's agreement to cut output after falling on data showing a surprisingly large increase in U.S. gasoline and distillate inventories.
Saudi Arabia cut oil output in January by at least 486,000 barrels a day to 10.06 million barrels a day, according to a Gulf source familiar with Saudi oil policy. That would mean the world's largest crude producer was holding up its end of a November agreement by the Organization of Petroleum Exporting Countries to reduce output.
That boosted oil prices, which had slipped after the U.S. government reported a big increase in U.S. gasoline and distillate inventories.
Oil has rallied 23 percent since mid-November and speculators have jumped on the rally, loading up on long positions in crude futures in recent weeks in anticipation of OPEC's supply cuts.
U.S. government data showed futures speculators as of last week had a bigger net long position in U.S. crude than at any time since mid-2014.
Some analysts suggested the rally could fizzle out soon, particularly if the Organization of the Petroleum Exporting Countries struggles to meet expected production cuts.
"I figure there's going to be some sort of correction that sticks with the market soon," said Carl Larry, principal consultant at Frost & Sullivan, adding he believes the market is too confident in OPEC's ability to stick with its agreed-upon cuts.
While some believe the rally has stretched too far, betting against gains has been a losing position for several weeks. Official figures that reveal whether various countries are keeping to their word will not be known for a few weeks.
"The problem with being short here is you're not going to see data that disputes (those statements) until late January," said Kyle Cooper, consultant with ION Energy Group in Houston.
Still, OPEC's task remains daunting. OPEC output in December was substantially higher than the level from where it agreed to lower output by 1.2 million barrels a day, according to a Reuters survey. That could make it harder to reach its target.
Overall output dipped to 34.2 million barrels a day from 34.4 bpd in November, still 1.7 million barrels more a day than OPEC's 32.5 million/bpd target.
U.S. crude inventories fell sharply by 7.1 million barrels in the week through Dec. 30 as refineries hiked output, the U.S. Energy Information Administration reported. That compared with expectations for a decline of about 2.2 million barrels.
But stocks of gasoline and distillates surged as refiners ramped up production to reduce crude inventories, a typical year-end practice to avoid higher taxes.
Gasoline stocks rose by 8.3 million barrels, compared with analyst expectations in a Reuters poll for a 1.8 million-barrel gain. Distillate stockpiles, which include diesel and heating oil, rose by 10.1 million barrels, versus expectations for a 1.1 million-barrel increase, the EIA data showed.
Refining runs increased sharply, particularly on the U.S. Gulf Coast, the main refining hub in the United States. While end-year refinery activity tends to increase, this was larger than expected.
"The magnitude of the products changes were much larger than expected and overwhelming somewhat supportive crude data," said Scott Shelton, energy specialist at ICAP in Durham, North Carolina.
U.S. gasoline prices were down about 0.6 percent on Thursday.
— CNBC's Tom DiChristopher contributed to this report.