Brent North Sea crude for September delivery added 65 cents to $118.35 (Dh434) per barrel in electronic trading.
New York's main contract, light sweet crude for September gained 45 cents to $119.62.
Oil had fallen on Tuesday on prospects for waning demand amid signs of slowing global economic growth, dealers said.
"Crude futures were a little stronger today, recovering from losses last night," said Sucden analyst Andrey Kryuchenkov on Wednesday.
"Today investors will be paying close attention to the weekly report on US fuel stocks."
He added: "Further support came from news that a Turkish pipeline, which carries crude from Baku to Ceyhan port on the Mediterranean, was shut down due to a fire blast."
Oil flow through the Baku-Tbilisi-Ceyhan (BTC) pipeline was cut Wednesday after an explosion sparked a fire in a section in eastern Turkey, local officials told Anatolia news agency.
The BTC pipeline carries oil from the Caspian Sea fields to Turkey's Mediterranean port of Ceyhan, from where tankers transport the crude to Western markets.
Later Wednesday, the US government's Department of Energy will release its report on American energy stockpiles in the week ending August 1. Market expectations are for falling crude and motor fuel stockpiles.
Crude prices have now slumped by about 20 per cent since hitting record highs above $147 on July 11.
"The decline in oil prices largely reflects ongoing worries that oil demand has weakened, especially in the US," said David Moore, a commodity strategist with the Commonwealth Bank of Australia in Sydney.
"As well, it appears that Tropical Storm Edouard has had only a limited impact on oil production in the Gulf of Mexico."
The storm made landfall Tuesday on the Texas coast. The market had initially feared Edouard would turn into a hurricane that could disrupt oil output.
The slowing US economy is once again the main concern for investors as the US Federal Reserve, in a widely expected move, kept its main interest rate unchanged at 2.0 per cent on Tuesday citing concerns about sputtering economic growth and inflationary pressures.
The United States is the world's biggest energy user, and slower economic growth tends to weigh on global oil demand projections.