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.