By Timothy Puko, Sarah McFarlane and Jenny W. Hsu

Oil prices are holding close to unchanged Thursday after data that suggested an unexpected rise in U.S. stockpiles has put a cap on a recent rally.

The American Petroleum Institute, an industry group, said late Wednesday that its estimates showed crude inventories rising 4.2 million barrels in the week ended Dec. 23, a week when analysts expected stockpiles had shrunk. Prices slipped on the news and have budged little since, extending a period of relative stasis that began late in Tuesday's trading.

U.S. crude for February delivery recently lost 6 cents, or 0.1%, to $54.00 a barrel on the New York Mercantile Exchange. Brent, the global benchmark, gained 23 cents, or 0.4%, to $56.45 a barrel on ICE Futures Europe. Brent's front-month February contract expires at settlement. The more-actively-traded March contract recently gained 18 cents, or 0.3%, to $57.14 a barrel

"The crude complex saw this week's bullish momentum grind to a halt," Robbie Fraser, commodity analyst at consultant Schneider Electric SA in Louisville, Ky., said in a note.

Oil prices had been rising gradually throughout December, after the world's exporters announced plans to cut output. But many traders are still awaiting signs that cuts are happening and storage levels are retreating from record highs.

The U.S. Energy Information Administration plans to release its weekly update on U.S. stockpiles at 11 a.m. EST, a day delayed because of the Christmas holiday Monday. Despite API's estimate of an increase, analysts surveyed by The Wall Street Journal forecast a 1.4 million barrel decline in crude supplies.

Analysts also forecast slight additions to both gasoline and distillates, which include heating oil and diesel. But API said there was a 2.8-million-barrel fall in gasoline stocks and a 1.7-million-barrel decline in distillate inventories, according to a market participant.

That is likely from a 604,000-barrels-a-day drop in refinery runs at a time of year when refineries usually run harder, said Tim Evans, a Citi Futures analyst. However, it isn't likely enough to cause a major retreat in oil prices.

"We continue to see a few reports of OPEC members reiterating their commitment to reducing production for 2017," he wrote in a note to clients. "These stories help keep the market focused on the production cuts and related expectations that the market will rebalance," sending prices higher despite other factors.

The boom of U.S. unconventional oil production has been a major threat to the Organization of the Petroleum Exporting Countries, which supplies one-third of the global oil supply. For over two years, the cartel ramped up their production in a bid to protect their market shares and weed out some of their less-competitive U.S. rivals.

But analysts have said the tactic was largely unsuccessful. The increase in supplies quickly outpaced demand growth and earlier this year prices sunk to as low as $26 a barrel, leading to a number of OPEC producers suffering from tighter national budgets because of weaker oil revenues. Meanwhile, production in the U.S. abated by less than expected. Last month, OPEC abandoned that strategy and agreed to cut their productions to jump-start prices, causing oil to rally above $50 a barrel to more than one-year highs.

But that rally could hit a limit, according to many analysts. The higher prices could simply encourage more output from other producers around the world, especially the unconventional drillers working shale fields in the U.S.

"Based on an improved crude price outlook, shale gas and oil drilling will pick up again," said consultancy JBC Energy in a research note.

Gasoline futures recently gained 1% to $1.6909 a gallon and diesel futures gained 0.7% to $1.7114 a gallon.

Write to Timothy Puko at tim.puko@wsj.com, Sarah McFarlane at sarah.mcfarlane@wsj.com and Jenny W. Hsu at jenny.hsu@wsj.com

(END) Dow Jones Newswires

December 29, 2016 10:42 ET (15:42 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.