The West Texas Intermediate for September delivery rose 49 cents to settle at 42.19 U.S. dollars a barrel on the New York Mercantile Exchange, while Brent crude for October delivery climbed 74 cents to close at 45.17 dollars a barrel on the London ICE Futures Exchange.
U.S. crude oil inventories decreased by 7.4 million barrels during the week ending July 31, the U.S. Energy Information Administration (EIA) said in a report on Wednesday. Analysts surveyed by S&P Global Platts had looked for EIA crude inventories to show a fall of 4.1 million barrels.
Oil prices also got a lift from the weak greenback as there is normally a reverse correlation between the foreign exchange value of the U.S. dollar and oil prices.
The dollar index, which measures the greenback against six major peers, dipped 0.55 percent to 92.8665 in late trading on Wednesday.
Looking ahead, experts noted headwinds remain on the oil market.
"OPEC's premature expansion of production and the fact that demand remains fairly weak argue against any further price rise," Eugen Weinberg, energy analyst at Commerzbank Research, said in a note.
The Organization of the Petroleum Exporting Countries (OPEC) and its allies, known as OPEC+, decided to scale back their record production cuts to 7.7 million barrels per day starting from August.
Latest comments