But the mood remained clouded by a supply glut and concerns over demand caused by a slowdown in major European economies and China.
US benchmark West Texas Intermediate for November delivery added 57 cents to USD 83.27 a barrel.
Brent North Sea crude for delivery in December won 38 cents to USD 86.20 per barrel.
"Oil has recouped some of this week's losses," said analyst David Madden at trading firm IG.
"Energy is firmly in oversold territory but the fundamentals don't show a major correction any time soon."
The report by the US Department of Energy showed a 4.0 million-barrel drop in gasoline inventories, much more than analysts had projected, indicating stronger-than-expected demand in the world's biggest economy.
But the report also showed a build up of 8.9 million barrels of crude stocks, much more than the 2.2 million projected.
Desmond Chua, market analyst at CMC Markets in Singapore, said buying sentiment kicked in after traders felt that "the sell-off (in oil) was a tad overdone".
"The fundamentals for oil have not changed. Supply and demand factors still remain as they were at the beginning of the week," Phillip Futures said in a note.
"We expect today's increase in prices to be just an adjustment to the recent drop (in) oil prices earlier in the week, and thus, unlikely to continue.
