Oil rose in post-settlement trade after a report that U.S. crude oil stocks fell.
Crude inventories fell by 6.7 million barrels in the week to July 1 to 520.9 million, compared with analysts' expectations for a decrease of 2.3 million barrels. Crude stocks at the Cushing, Oklahoma, delivery hub rose by 80,000 barrels, American Petroleum Institute said.
U.S. crude was last up $1.17, or 2.53 percent, at $47.78, after it settled at $47.43 a barrel, up 1.78 percent, or 83 cents. The contract fell 5 percent to end at $46.60 on Tuesday.
Global benchmark Brent futures were up 76 cents at $48.72 a barrel after a 4.1-percent drop on Tuesday.
Before the report, oil prices had risen after a two-day decline lured buyers back, although analysts cautioned the market will likely remain under pressure from a U.S. gasoline glut and economic worries over Britain's exit from the European Union.
Gasoline futures were up a quarter of a percent after hitting a 3-month low.
Profit for turning crude oil into gasoline, known as the gasoline "crack," fell to a February bottom below $13 a barrel as oversupply in the motor fuel forced U.S. refiners to cut output. Vessels carrying gasoline-making components could not unload at New York Harbor this week due to a glut.