U.S. crude closed roughly flat on Wednesday, giving up gains after the government reported another weekly build in crude inventories and a survey suggested OPEC output rose this month.
Brent futures were up 12 cents to $39.26 a barrel, after hitting a session peak of $40.61.
U.S. crude settled at $38.32 a barrel, up 4 cents, or 0.1 percent, having earlier traded as high as $39.85.
U.S. crude inventories rose 2.3 million barrels in the last week, the U.S. Energy Information Administration reported. That was less than the 3.3 million-barrel build analysts had expected.
Still, oil bulls were disappointed because the build came even as refinery utilization rates rose 2 percentage points to 90.4 percent of total capacity, the highest rate seasonally since 2005.
"The data poses a bit of a conundrum, in that crude stocks still increased so much despite strong refining runs and an apparent drop in imports," said Matt Smith, director of commodity research at New York-headquarter energy data provider ClipperData.
Dominick Chirichella, senior partner, Energy Management Institute, New York, concurred. "Overall, I would categorize the report as more neutral than anything else."
Oil rose early, following share prices on Wall Street which hit 3-month highs. Oil also got a boost from a weak dollar, which fell to a near two-week low, making oil and other commodities denominated in the greenback more attractive to users of the euro and other currencies.
Both Brent and U.S. crude fell about 3 percent on Tuesday on concerns about swelling global oil supplies, including new output from Kuwait and Saudi Arabia.
OPEC oil output is rising in March, a Reuters survey found, as higher supply from Iran after the lifting of sanctions and near-record exports from southern Iraq offset maintenance and outages in smaller producers.
However, the Reuters survey also found no major change in production in top exporter Saudi Arabia — another sign that Riyadh is serious about freezing output to support prices.
Oil prices have risen about 50 percent over the past two months after major producers within and outside the Organization of the Petroleum Exporting Countries floated the idea of freezing production at January's highs.
On Tuesday, Saudi Arabia and Kuwait, two of OPEC's biggest exporters, said they would resume production at the jointly operated 300,000-barrels-per-day Khafji field even with a meeting on the production freeze set for April 17.
"The fact that the announcement comes so shortly before the meeting in Doha is a disastrous sign," said Commerzbank oil analyst Carsten Fritsch. "After all, it gives the impression that the lip service paid to freezing oil production is nothing but hot air."
The International Energy Agency, which oversees energy policies of industrialized nations, forecasts global stock builds to continue this year. But it said on Wednesday Iran was not adding as many barrels into the market as expected despite the easing of international sanctions against Tehran in January.
"It was misleading to believe that there would be a huge amount of new Iranian crude and natural gas production entering the market in the short term," Fatih Birol, the IEA's executive director, told Reuters.
OPEC member Iran is expected to attend an oil producers meeting in Doha, although it may not take part in the talks.
The freeze idea emerged after prices fell below $30 a barrel in January from as high as $115 in June 2014 on global oversupply spurred by U.S. production growth and rising output from oil exporter group OPEC.