US oil settles down 71 cents, or 1.81%, at $38.60 a barrel

Crude inventories down 5.5M barrels
Oil's cash burn driven by these two factors
M&A in the oil patch: Expert

Oil closed lower on Wednesday after U.S. gasoline stocks rose more than expected, compounding negative sentiment after worldwide falls in equities that helped drag fuel prices to 6-1/2-year lows.

U.S. crude stocks fell sharply last week as imports tumbled, while gasoline and distillate inventories rose despite a reduction in refinery runs, the Energy Information Administration (EIA) said on Wednesday.

The draw in crude stocks had largely been anticipated but the gasoline build had not been factored into prices, analysts and traders said.

Read MoreOil is the biggest investing opportunity: Strategist

"Plummeting gasoline seems to be a drag on crude oil prices," said Carsten Fritsch, senior oil analyst at Commerzbank in Frankfurt, Germany.

"This is due to rising gasoline stocks, despite sharply lower gasoline production," Fritsch added.

Brent was up 3 cents at $43.24 a barrel by 2:33 p.m EDT, and U.S. crude settled down 71 cents at $38.60 a barrel, just one cent above the session's low.

Big oil buys?

Benchmark oil futures prices had stabilised earlier on Wednesday after China moved to support the country's economy.

U.S. durable goods data also beat market expectations.

Read More3 charts explain how oil is roiling world currencies

U.S. commercial crude oil stockpiles fell by 5.45 million barrels to 450.76 million barrels in the week ended Aug. 21, the EIA said on Wednesday.

Analysts had expected to see a crude oil stocks rise of around 1 million barrels.

This was a smaller drawdown than industry data from the American Petroleum Institute showed on Tuesday, which said there had been a crude stockpile decrease of 7.3 million barrels last week to 449.3 million.

Oil has lost a third of its value since June on high U.S. production, record crude pumping in the Middle East and concern about falling demand in Asian economies.

Read MoreGartman: I'm on the sidelines on oil ... for now

On Monday, both crude oil benchmarks saw their lowest trades since early 2009, dropping as much as 6 percent in one session after heavy falls in equity markets.

"The trend remains down, but in an erratic phase where attempts to recover are being made," PVM Oil Associates director Robin Bieber said.