Oil closed up about 3 percent on Tuesday as oversold conditions brought some buyers back to the market, but a lingering supply glut and worries about the slowing economy in top commodities consumer China kept crude prices near 6-1/2-year lows.
U.S. crude settled up $1.07, or 2.80 percent, at $39.31 a barrel, advancing from $37.75, its lowest since February 2009 set in the previous session.
Brent gained turned positive in the extended-hours session, gaining about 2 percent, on a surprise drop in crude inventories. API crude inventories fell by 7.3 million, versus StreetAccount forecasts for a rise of 2.48 million.
Futures of U.S. crude and Brent, the global oil benchmark, are both down more than 16 percent on the month. About half of those losses were incurred in the past two sessions as plummeting Chinese equities sparked a selloff across global markets.
China cut interest rates on Tuesday and lowered the amount of reserves banks must hold in its latest move to stimulate growth, aiding a recovery in European and Wall Street shares.