Oil prices nudged higher in tepid Asian trading on Thursday, supported by a weaker dollar and optimism that crude producers would abide by an agreement to curb output to prop up markets.
But gains were capped by an unexpected rise in U.S. crude inventories last week and as Libya said it expected to boost output over the next few months.
Brent futures for February delivery climbed 18 cents to $54.64 a barrel as of 0423 GMT, having previously finished 89 cents lower.
U.S. West Texas Intermediate crude rose 15 cents to $52.64 a barrel, after closing the previous session down 81 cents.
The dollar index, which tracks the greenback against a basket of six rival currencies, slipped as investors took profits after its rise to a 14-year peak of 103.65 earlier this week.
A weaker dollar makes greenback-denominated commodities including oil cheaper for holders of other currencies.
"We're pretty close to the closing level - it'll be interesting to see if the upward momentum is maintained as the Europe and U.S. sessions open up," said Ric Spooner, chief market analyst at CMC Markets in Sydney.
Russian Energy Minister Alexander Novak on Wednesday said trust between oil producing countries is important if a global deal to curtail output is to succeed.
"It is a safe assumption particularly in the early stages that OPEC and non-OPEC producers will abide by the agreement to curb output," Spooner said.
"If you look at where the biggest production cuts are coming from its largely about the Gulf states and Russia - this gives me even more comfort there will be material compliance," he said.
"Russia invested a lot in securing agreement so you wouldn't expect them to fail to comply in the early stages. I think compliance is likely."
Members of the Organization of the Petroleum Exporting Countries (OPEC) led by Saudi Arabia and non-OPEC members signed a deal earlier this month to cut oil output by almost 1.8 million barrels per day from Jan. 1.
Meanwhile, Libya's National Oil Corporation (NOC) said it hoped to add 270,000 barrels per day (bpd) to national production after it confirmed on Tuesday that pipelines leading from the Sharara and El Feel fields had reopened. NOC said that Sharara output reached 58,000 bpd on Wednesday.
Libya recently doubled output to 600,000 bpd, but Jonathan Barratt, chief investment officer at Sydney's Ayers Alliance, said the country had the capacity to ramp up production to 1.2 million bpd.
He forecast U.S. crude would climb to $60 a barrel in the first quarter of 2017 with Brent prices $2 to $3 higher.
"I think that is very temporary though because there will be a lot more supply available including from U.S. shale drillers," Barratt said.
Elsewhere, U.S. crude stocks posted a surprise build last week, climbing by 2.3 million barrels compared with an expected decline of 2.5 million barrels, the U.S. Energy Information Administration said on Wednesday.