Benchmark oil for October delivery rose 21 cents in late afternoon Bangkok time to $96.18 per barrel in electronic trading on the New York Mercantile Exchange. The contract fell 68 cents to end the day at $95.47 in New York on Monday.
In London, Brent crude rose 22 cents to $112.48 a barrel on the ICE Futures exchange.
Oil analyst Stephen Schork said in an e-mail commentary that traders are focusing on the Venezuelan refinery fire, Tropical Storm Isaac and U.S. consumer confidence, which he said was expected to rise for the month of August.
Rising confidence is a sign that consumers might be ready to spend, which could lead to an increase in fuel consumption and move prices higher.
Meanwhile, threats to production in the Gulf of Mexico from Tropical Storm Isaac appeared to lessen.
Forecasts for Isaac have been toned down, easing concerns that the storm could damage key oil and gas operations along the U.S. Gulf Coast.
Weather forecasters now say the storm will grow to a Category 1 hurricane instead of a stronger Category 2.
Although the storm isn't expected to damage refineries, refinery owners often shut down operations in advance of a storm. The refineries will likely stay off line for about three days.
Another factor pushing up prices was an intense fire at the Amuay refinery in western Venezuela. The fire has been burning since a huge explosion at the refinery on Saturday caused a suspension of operations there.
Amuay is among the world's largest refineries and is part of the Paraguana Refinery Complex, which also includes the adjacent Cardon refinery. Together, the refineries process about 900,000 barrels of crude per day and 200,000 barrels of gasoline.
In other energy trading natural gas rose marginally to $2.66 per 1,000 cubic feet. Heating oil rose less than a penny to $3.12 a gallon.