Oil prices cut early losses after Iraq said it was willing to "shoulder responsibility" for some of OPEC's planned production cuts and as U.S. government data showed crude inventories fell last week.
But gains were capped by investor doubts that OPEC will agree to a production cut large enough to make a significant dent in the global glut of crude.
OPEC's deal faced potential setbacks from Iraq's call for it to be exempt. Baghdad had said it needs oil revenues to fight Islamic State militants and questioned whether it should cut from the levels of OPEC's estimates or its own, higher, production figures.
But Prime Minister Haider al-Abadi told reporters on Wednesday in Baghdad that Iraq is willing to cut its crude oil output as part of OPEC's plan to reduce global supply and boost crude prices.
Abadi's comments are the clearest indication so far that Baghdad will support an OPEC plan to cut production by 4 percent to 4.5 percent when it meets on Nov. 30 in Vienna.
International Brent crude oil futures fell 18 cents to $48.94 a barrel by 2:35 p.m. (1935) after climbing to $49.42 a barrel earlier in Wednesday's session on optimism OPEC would agree to an output cut.
U.S. West Texas Intermediate (WTI) crude oil futures settled down 7 cents at $47.96 a barrel after rising to $48.30 earlier on Wednesday.
U.S. crude stocks fell last week as refineries hiked output and imports fell, data from the Energy Information Administration showed on Wednesday.
Crude inventories fell by 1.3 million barrels in the last week, compared with analysts' expectations for an increase of 671,000 barrels.
Offsetting the headline data, gasoline stocks rose by 2.3 million barrels, compared with analysts' expectations in a Reuters poll for a 643,000-barrel gain. Distillate stockpiles, which include diesel and heating oil, were up by 327,000 barrels, versus expectations for a 357,000-barrel drop.
Also on Wednesday, Baker Hughes reported the number of oil rigs operating in U.S. fields rose by 3 to a total of 474 in the latest week. At this time last year, the rig count stood at 555.
Futures had edged lower on Wednesday on investors' doubts that OPEC would agree to a large enough output cut to significantly reduce the global surplus when it meets next week.
A strong dollar, trading near the 13½-year peak hit last week, also weighed on prices amid thin trading ahead of the U.S. Thanksgiving holiday on Thursday.
Exxon Mobil's giant oil refinery in Baton Rouge, Louisiana, was operating at planned rates on Wednesday after a fire Tuesday, according to a person familiar with the plant's operations. The refinery is the fourth-largest in the United States, with capacity to refine 502,500 barrels per day in crude oil.
Many traders anticipate some agreement at OPEC but fear the aim, proposed by Algeria, of cutting production by 4 to 4.5 percent, or over 1.2 million barrels per day according to Reuters calculations, may not be reached.
The deal's success hinges on an agreement from Iraq and Iran, which may not give a full backing, three OPEC sources said Tuesday. Iran wants to increase supply because its output has been hit by sanctions.
In September, OPEC agreed to bring total output down to the level of 32.5 million to 33 million barrels a day.
Short-term though, analysts said that investors were currently unwilling to push crude prices to $50 a barrel or higher.
— CNBC's Tom DiChristopher contributed to this report.