Oil prices edged lower on Tuesday, retreating from near-five-month highs in advance of data expected to show a build in U.S. crude inventories.

The market, however, remained buoyant ahead of Friday's meeting between the Organization of the Petroleum Exporting Countries with non-OPEC producers to discuss progress of their 1.8-million barrel per day supply cut deal.

OPEC's second-biggest producer Iraq said that the group was discussing several options for its supply pact, including an extension beyond March and a further output cut.

Nigeria and Libya will send representatives to the meeting despite being exempt from the current deal, two OPEC sources said. Rising output from both countries has kept a lid on price gains, prompting suggestions that they could be included in the deal.

"It feels kind of like positioning ahead of tonight's report but there's not a lot of action behind the move," said Phil Flynn, analyst at Price Futures Group in Chicago.

Industry group the American Petroleum Institute releases its U.S. weekly oil stock data at 4:30 p.m. ET, a day ahead of data from the U.S. Energy Department.

Analysts forecast crude stocks rose 2.9 million barrels last week, as fuel inventories drew down. That would continue a trend established in the wake of Hurricane Harvey, as imports resumed while refineries were still restarting.

Demand for crude is also expected to rebound in coming weeks in the United States, where about one-quarter of U.S. refining capacity was shut due to Harvey, which hit the Gulf Coast in late August.

The current threat is Hurricane Maria, now making its way through the Caribbean, but it is not expected to threaten the U.S. Gulf, instead turning north in the Atlantic Ocean. Still, cargoes have been shifted around as the storm could dampen oil demand and disrupt maritime trading.

Sentiment has been buoyed since last week when the International Energy Agency (IEA) lifted its 2017 demand outlook and the Organization of the Petroleum Exporting Countries estimated that the world would need more of its crude next year.

Iraq itself has limited output by about 260,000 barrels per day (bpd), its oil minister said, exceeding its 210,000 bpd quota agreed under the OPEC-led pact.

His comments come a day after official export data showed that Saudi Arabian July crude exports dropped to the lowest level in three years, highlighting its own compliance with the restrictions.

However, rising crude prices have encouraged drilling in U.S. shale oil regions. The U.S. government said on Monday that it expects shale output to rise for a 10th straight month in October.

"This will make it more difficult for OPEC to achieve the desired market balance," Commerzbank analysts said.