Brent crude oil prices rose by more than $1 on Wednesday, reversing early losses to settle above $103 a barrel and increasing its premium over U.S. crude to the largest in 13 sessions.
The gain came as U.S. equity markets rallied to record highs and signs of deadlock on nuclear talks with Iran lent support to the global oil benchmark.
Data showing the euro zone was in its longest recession ever and an increase in U.S. refined products inventories had sparked an early selloff.
U.S. stocks edged up on Wednesday, with the Dow and S&P 500 hitting new all-time highs as the market's recent upward momentum persisted, but a steep decline in Apple AAPL.O kept gains in check.
U.S. crude inventories fell last week, but gasoline and distillate stocks rose along with refinery rates, the EIA data showed. Stocks at the Cushing, Oklahoma, crude storage hub rose 575,000 barrels to 49.72 million barrels.
"We got down to a level about halfway between our recent peaks and troughs, and then selling just stopped. Perhaps for all intents and purposes the market had already priced the report in," said Stephen Schork, the editor of The Schork Report in Villanova, Pennsylvania.
News that the United Nations' nuclear agency's talks with Iran over its suspected atomic bomb research had stalled lent further support to Brent prices.
Brent crude rose $1.08 to settle at $103.68 a barrel after falling to $101.20 earlier in the day.
U.S. oil edged up 9 cents to settle at $94.30 a barrel after losing more than $2 following the release of the EIA data.
The spread between two widened to settle at $9.38, the highest in 13 sessions.
Despite the build in gasoline stocks, U.S. RBOB gasoline prices rose 3 cents.
Brent crude is down nearly 13 percent from its 2013 peak on weaker demand in China and a sluggish recovery in the U.S. economy, the world's two biggest oil consumers.
The euro zone's economy contracted for the sixth straight quarter at the start of the year, marking its longest recession since records began in 1995.
The Brent June contract traded on the Intercontinental Exchange expires Thursday. (Additional reporting by Ron Bousso in London, Manash Goswami in Singapore; Editing by Chris Reese)