Oil prices surged as much as 4 percent on Tuesday in a technical correction and on short covering after a two-month lows hit in the previous session, traders said.
Anticipation that data later on Tuesday would show an eighth straight week of declines in U.S. crude stockpiles also boosted the market.
Brent and WTI had been up about 2 percent in early New York trading, riding on a weaker dollar and rally in global equity markets.
"The sharper move up caught everyone by surprise as there's probably short covering adding on to the technical buyback," said a crude futures broker.
Some investors and analysts said gasoline and diesel were in oversupply despite summer driving demand in the United States and that could pressure the broader petroleum complex again.
Saudi Arabia's energy minister also there were hundreds of millions of barrels of surplus crude oil in the global market, although a price above $50 a barrel was required to ensure continued investment in the space.
Oil producing group OPEC said it was optimistic of seeing balance in supply-demand next year even as it lowered its expectations for 2016 global growth due to the uncertainties caused by Britain's exit from the European Union.
A rally in global equity markets weighed on safe havens, including the dollar, pushing it down 0.2 percent. A weaker dollar makes greenback-denominated oil more attractive to holders of the euro and other currencies.
Oil prices hit two-month lows on Monday, with Brent sliding to $45.90 and WTI $44.42.
"This certainly appears to be a technical correction. My call was for WTI to test $44.35 and we had almost gotten there," said Troy Vincent, analyst at New York-based energy data provider Clipperdata. "Also, I think the market is hesitant to move nearer to $40 support so quickly in the middle of summer."
A Reuters poll forecast U.S. crude stockpiles fell 3.3 million barrels last week, declining for an eighth week in a row.
The American Petroleum Institute (API), a trade group, will issue its own stockpiles report at 4:30 p.m. EDT (2030 GMT) before official inventory data on Wednesday from the U.S. government's Energy Information Administration (EIA).
The EIA will separately issue a short-term energy outlook (STEO) for July at around noon (1600 GMT) on Tuesday.
Oil prices tumbled last week after the EIA reported disappointing drawdowns in U.S. crude and gasoline inventories that pointed at weak demand.
A rising U.S. oil drilling rig count and cuts in bullish hedge fund bets on crude to four-month lows have also pressured prices.
On Tuesday, commodity and stock prices rose as the dollar index dropped 0.4 percent. The British pound bounced back from a 31-year low amid easing political tensions in Britain and as hopes for stimulus measures boosted risk appetite.
On the downside, a Reuters poll showed that China's economic growth likely cooled to a seven-year low in the second quarter as the industrial sector lost steam and a boost from financial services faded.
China's top oil firm, CNPC, said it saw the country's oil consumption rising to 670 million tonnes by 2027 from 520 million in 2014, implying annual growth of just 2 percent.
"Oil prices could rally each time macro sentiment recovers on expectations of yet another round of quantitative easing, but for now the path of least resistance seems to be lower in the near term," analyst Virendra Chauhan of Energy Aspects told the Reuters Global Oil Forum.
Energy Aspects cut its third-quarter Brent forecast to $52 from $55 a barrel.