Oil fell to near three-month lows and U.S. crude futures slipped to below $40 a barrel before settling higher on Wednesday as short-covering lifted a market initially suppressed by worries about a global supply glut.
U.S. crude inventories grew by 252,000 barrels last week, according to data from the Energy Information Administration (EIA) that came in below a 2 million-barrel build forecast by analysts in a Reuters poll.
The smaller-than-expected stockpiles growth convinced some traders and investors to cover short positions in late trading, helping oil prices recover.
Crude futures tumbled earlier after the EIA data showed the eighth straight week in builds leaving inventories at 487.3 million barrels, within a hair of the April record of 490.9 million.
U.S. crude's West Texas Intermediate (WTI) futures settled up 8 cents at $40.75 a barrel, after hitting a session low at $39.91. The last time WTI traded below $40 was on Aug. 27.
Brent settled up 57 cents, or 1.3 percent, at $44.14, helped by a relatively better outlook for the global crude benchmark versus WTI.
"To convince me today's action was more than short-covering, I'd need to see a close above $42 on WTI," said David Thompson of Powerhouse, a Washington-based energy-focused commodities broker.
Chris Jarvis, analyst at Caprock Risk Management in Frederick, Maryland, saw weakness returning to crude prices in coming days.
"This week's (EIA) data point is unlikely going to relieve the selling pressure on the oil markets, with U.S. stocks at record levels for this time of year and knocking on the all-time high set earlier in the year," said Jarvis.
"Production remains resilient even in this low price environment," he added.
The premium, or contango, for second-month WTI versus the front month <CLc1-CLc2> hit near seven-month highs, highlighting the better fundamentals for long-dated oil contracts.
The oil market has been pricing crude for future delivery at much higher rates as traders keep millions of barrels in storage with the hope of making more money in later sales. <0#O:> <0#LCO:>
"If you look beyond the day-to-day, the fundamentals are bearish," said Virendra Chauhan, analyst at Energy Aspects in Singapore. "There's talk of floating storage and if you look at differentials for physical oil in the North Sea, for Urals and for West Africa they are very low."
(By Barani Krishnan; Additional reporting by Simon Falush in New York and Henning Gloystein in Singapore; Editing by Marguerita Choy)