Crude oil futures rose modestly after a volatile trading session as the U.S. front-month August contract headed to expiration on Tuesday, with the weaker dollar providing support.
U.S. August crude, set to expire on Tuesday, closed up 21 cents, or 0.4 percent, at $50.36 a barrel.
Front-month August crude dropped below $50 on Monday for the first time since April and the front-month price is down 15 percent in July. Brent crude for September was 30 cents higher at $57 a barrel, having swung from $56.33 to $57.44. Brent's premium to September U.S. crude was near $6 a barrel.
Weak U.S. RBOB gasoline futures curbed gains for crude, especially Brent, traders said, as expectations that inventories rose again last week as refiners continue to operate at a high utilization rate weigh on prices.
The dollar retreated from a three-month high against a basket of currencies on mild profit-taking.
Read More Oil rebound? These banks think so
A rising dollar makes it more profitable for non-U.S. investors to sell dollar-denominated assets and a weaker greenback makes oil less expensive for consumers using other currencies.
"Seems like there is volatility with the U.S. August contract set to expire and the weak equities are not helping either," said John Kilduff, partner at Again Capital LLC in New York.
Expectations of more Iranian supply following last week's agreement on Tehran's nuclear program and concerns that economic worries in China and Europe will weigh on demand have put pressure on oil this month.