Oil prices sharply pared gains in post-settlement trading after preliminary data from the American Petroleum Institute showed a surprise build in U.S. gasoline stocks.
U.S. West Texas Intermediate crude was last up 1.5 percent at $46.44 a barrel, while international Brent crude was up 1.5 percent at $49.08 a barrel.
Some traders had cautioned that the API's preliminary weekly U.S. crude stockpiles data could show a fourth week of builds.
"If we've learned anything about the oil market, it is that sentiment is extremely fragile," said Michael Tran, director of energy strategy at RBC Capital Markets in New York.
Earlier on Tuesday, oil settled up nearly 2 percent, hitting five-week highs for a second straight day as sources at OPEC spoke of Saudi Arabia's apparent desire for higher crude prices while Russia met the producer group to discuss the market.
A weaker dollar also supported crude prices, as did the loss of more than 700,000 barrels per day (bpd) in Nigerian output to militant attacks and pipeline problems.