Investing.com - West Texas Intermediate oil futures erased gains on Wednesday, after data showed that oil supplies in the U.S. rose unexpectedly last week.
On the New York Mercantile Exchange, crude oil for August delivery shed 64 cents, or 1.22%, to trade at $51.69 a barrel during U.S. morning hours. Prices were at around $52.63 prior to the release of the inventory data.
The U.S. Energy Information Administration said in its weekly report that U.S. crude oil inventories rose by 384,000 barrels in the week ended July 3.
Market analysts' expected a crude-stock fall of 700,000 barrels, while the American Petroleum Institute late Tuesday reported a decline of 958,000 barrels.
Supplies at Cushing, Oklahoma, the key delivery point for Nymex crude, increased by 223,000 barrels last week, compared to estimates for a drop of 100,000 barrels.
Total U.S. crude oil inventories stood at 465.8 million barrels as of last week, remaining near levels not seen for this time of year in at least the last 80 years.
The report also showed that total motor gasoline inventories rose by 1.2 million barrels, while distillate stockpiles increased by 1.6 million barrels.
Energy traders have been paying close attention to gasoline stockpiles in recent weeks as the U.S. driving season entered its peak gasoline demand period.
On Tuesday, New York-traded oil prices tumbled to $50.58, the weakest level since April 6, before ending at $52.33, down 20 cents, as concerns over Greece's debt crisis and steep losses on Chinese stock markets weighed.
Elsewhere, on the ICE Futures Exchange in London, Brent oil for August delivery dipped 5 cents, or 0.1%, to trade at $56.80 a barrel. Brent traded in a range between $55.88 and $57.75.
A day earlier, London-traded Brent hit $55.10, a level not seen since March 25, before closing at $56.85, up 31 cents, or 0.55%.
The spread between the Brent and the WTI crude contracts stood at $5.11 a barrel, compared to $4.52 by close of trade on Tuesday.
Market sentiment was boosted by fresh hopes for a solution to Greece's debt crisis after euro zone officials gave the country until Thursday to present new proposals to secure a deal with creditors.
Greece formally requested a three-year bailout from the European Stability Mechanism, the euro zone’s permanent bailout fund, on Wednesday.
Oil prices sold off earlier as shares in China plunged further despite fresh efforts by the government to calm the market.
The Shanghai Composite tumbled nearly 6% in volatile trade on Wednesday after having fallen as much as 8% shortly after the open with trading in more than 500 companies listed in Shenzhen and Shanghai suspended. The index is down almost 37% over the past four weeks.
Market players are concerned that the plunge in the stock market could spread to other parts of the Chinese economy, triggering fears that the Asian nation's demand for oil will decline.
China is the world's second largest oil consumer after the U.S. and has been the engine of strengthening demand.
Oil traders were also eyeing nuclear talks between the West and Iran, which could push millions of barrels of crude into the oversupplied world market.
Tehran wants to double oil exports to more than two million barrels a day if a deal is reached and sanctions are lifted, a top Iranian official said Monday.
Global oil production is outpacing demand following a boom in U.S. shale oil production and after a decision by the Organization of Petroleum Exporting Countries last year not to cut production.