Traders also kept an eye on tumbling stock markets and a global economic downturn that has depleted the world's demand for energy, analysts said.
New York's main contract, light sweet crude for delivery in March, added 47 cents to $41.31 a barrel.
In London, Brent North Sea crude for March gained 14 cents to $43.76 a barrel.
Traders were awaiting the weekly US energy report, which will be released on Thursday, one day later than normal owing to Monday's public holiday in the United States.
"Oil will probably trade in a tight range until the release of the oil inventory numbers," said BetOnMarkets analyst Dave Evans in London.
He added: "Prices will probably fall as analysts are expecting another buildup of oil inventory."
MF Global analyst Mike Fitzpatrick said there is "perhaps the beginning indication of some inherent strength" in prices.
He added that sagging equity markets and a rallying dollar had created an "environment not particularly friendly to oil prices, as we have seen, but it will take more than that to push to new lows."
The expiry on Tuesday of New York's February contract may also have contributed to recent selling pressure as traders sought to balance their books, Fitzpatrick said.
On Tuesday, New York crude prices had tumbled underneath $33 in intra-day trade, close to a four-year low, before the February contract expired at $38.74 a barrel.
As a worsening global economic crisis hits demand for oil, prices have fallen from record highs above $147 reached in July.
Traders also eyed the latest developments in key crude producer Nigeria.
On Wednesday, gunmen kidnapped a Romanian sailor when they attacked an oil tanker off the coast of Nigeria, security sources said.
The attack on the MT Meredith laden with 4,000 tonnes of diesel was carried out by the gunmen in speedboats at the Bonny Fairway Buoy off the restive Niger Delta, the private security source, who asked not to be named, told AFP.
He said the ship sustained "massive damage" during the attack.
No group has claimed responsibility for the incident, the latest in the country's oil-producing south during recent months.
On Sunday, militants attacked a loading vessel, a tanker and a tug boat at a crude oil platform operated by Shell in Bonny and took eight crew members hostage.
The militants killed one person and injured the captain of the tug boat, a military spokesman said.
There has been an upsurge in violent attacks on Nigeria's oil industry and kidnappings of both local and foreign oil workers since January 2006.
The unrest has reduced the country's oil output by more than one quarter as production currently stands around two million barrels a day against 2.6 million barrels in three years ago.
Follow Emirates 24|7 on Google News.