U.S. crude closed lower on Thursday on pressure from large inventory builds, while Brent oil erased its early losses to trade steady on support from a weak dollar and higher gasoline prices.
Brent futures were up 8 cents at $44.22 a barrel by 2:33 p.m. EST, after hitting a session low of $43.70.
U.S. crude's benchmark West Texas Intermediate (WTI) futures settled down 21 cents, or 0.52 percent, at $40.54 a barrel, after snapping below the key $40-a-barrel support for a second time since Wednesday.
"The dollar is certainly helping commodities today," said Scott Shelton, energy broker and commodities specialist at ICAP in Durham, North Carolina.
"But gasoline is also giving a prop to Brent and widening its crack with WTI. I'd be careful about being short gasoline."
The dollar fell to a near one-week low against a basket of currencies, making crude and other commodities denominated in the greenback more affordable for holders of currencies such as the euro. The 19-commodity Thomson Reuters/Core Commodity CRB Index rose for a second straight day.
U.S. gasoline futures rose more than 1 percent to $1.29 a gallon after a report that Irving Oil's planned restart of the gasoline-making unit at its 300,000-barrels-per-day refinery in St. John, New Brunswick had been delayed beyond the Nov. 15 target.
The profit that refiners get for turning crude into gasoline, known in market parlance as the gasoline crack <CL-RB1=R>, widened to more than $13.50 a barrel, the highest in 2-1/2 months.
While Brent traded higher than WTI due to relatively better supply/demand fundamentals, the higher gasoline crack was also supporting the London-traded Brent as U.S. traders eyed more imports of crude to be refined into gasoline.
WTI hit August lows on Wednesday, briefly falling below $40, after an eighth straight week of builds in U.S. crude stockpiles that took inventories to above 487 million barrels, or just below April's record highs of nearly 491 million.
WTI's weakness was also demonstrated by the growing discount between the spot month to forward contracts as traders stored more crude in the hope of delivering at higher prices later.
On Thursday, the discount, or contango, for December WTI vs December 2016 WTI reached a record wide $8 a barrel.
Goldman Sachs said there remained a downside risk to oil prices "as storage utilization continues to climb".
"We don't believe that current prices present an appealing entry point," the Wall Street bank added.