LONDON: The oil output of the Organization of Petroleum Exporting Countries (OPEC) fell in December from a record high ahead of a deal to cut production, a Reuters survey found on Thursday.

The decline, the first since May according to Reuters surveys, occurred despite higher exports from second-largest OPEC producer Iraq and a further upward trend in Libyan output.

Supply from OPEC in December fell to 34.18 million barrels per day (bpd) from a revised 34.38 million bpd in November, according to the survey based on shipping data and information from industry sources.

Oil hit an 18-month high of $58.37 a barrel on Tuesday, boosted by an OPEC agreement to lower supply from Jan. 1.

The supportive impact of the agreement on prices may not occur straight away, an analyst at SEB said.

“We are not necessarily set for an immediate price take-off. One problem is the very high OPEC production in fourth-quarter 2016,” said Bjarne Schieldrop, chief commodities analyst at SEB.

“The still-rising crude oil production in Libya is also creating concerns that OPEC’s cuts might be less effective.”

Based on the December survey, OPEC is pumping 1.68 million bpd above the 32.50 million bpd production target that it agreed on Nov. 30 to adopt from Jan. 1 in its first supply cut decision in eight years.

OPEC output started to climb following its decision in late 2014 to retain market share rather than cut supply to prop up prices. Saudi Arabia, Iraq and Iran all pumped more and production also increased due to the return of Indonesia in 2015 and Gabon in July 2016 as OPEC members.

In December, the biggest reduction came from Nigeria, although not as a result of deliberate cuts to boost prices.

No Forcados crude was exported following an attack on a pipeline, and shipments of the Agbami stream fell most likely due to planned maintenance work, sources in the survey said.

Nigeria and Libya are both exempt from the OPEC supply cut agreement because of output losses caused by conflict.

Nigerian militant group Niger Delta Avengers said in November it had attacked the Forcados pipeline.

Saudi Arabia, which said it pumped a record amount in November, supplied less in December, sources in the survey estimated. Exports were lower because customers asked for less crude, not because of cutbacks implemented under the OPEC deal.

“Exports are down markedly from a massive November number,” said one source who tracks Saudi output. “The bottom line is December is down from November with regard to supply to market.”

Among countries with higher output, the largest increase of 70,000 bpd was in Libya, where a two-year blockade was lifted in December on pipelines leading from two western fields. The recovery remains at risk from political conflict.

Output also climbed in Iraq, the survey found, with exports from the country’s south most likely exceeding November’s record rate of 3.407 million bpd, according to shipping data and industry sources.

Iran, which was allowed to raise output under the OPEC deal as sanctions had crimped its supply, pumped 30,000 bpd more.

The Reuters survey is based on shipping data provided by external sources, Thomson Reuters flows data, and information provided by sources at oil companies, OPEC and consulting firms.

Oil has rallied 23 percent since mid-November and speculators have jumped on the rally, loading up on long positions in crude futures in recent weeks in anticipation of OPEC’s supply cuts.

Oil prices rose on Thursday in an up-and-down session.

As of 1833 GMT, West Texas Intermediate crude was up 28 cents, or 0.5 percent, to $53.55 a barrel. Brent crude rose 30 cents, or 0.5 percent, to $56.76 a barrel, after hitting a high of $57.35 earlier in the session.

US government data showed futures speculators as of last week had a bigger net long position in US crude than at any time since mid-2014.

While some believe the rally has stretched too far, betting against gains has been a losing position for several weeks. Official figures that reveal whether various countries are keeping to their word will not be known for a few weeks.

“The problem with being short here is you’re not going to see data that disputes (those statements) until late January,” said Kyle Cooper, consultant with ION Energy Group in Houston.

Still, OPEC’s task remains daunting. OPEC output in December was substantially higher than the level from where it agreed to lower output by 1.2 million barrels a day, according to a Reuters survey. That could make it harder to reach its target.

Overall output dipped to 34.2 million barrels a day from 34.4 bpd in November, still 1.7 million barrels more a day than OPEC’s 32.5 million/bpd target.

US crude stocks fell sharply to end the year, the Energy Information Administration said, with a draw of 7 million barrels, but stocks of gasoline and distillates surged as refiners ramped up production to reduce crude inventories, a year-end practice to avoid higher taxes.

Refining runs increased sharply, particularly on the US Gulf Coast. While end-year refinery activity tends to increase, this was larger than expected.

“The magnitude of the products changes were much larger than expected and overwhelming somewhat supportive crude data,” said Scott Shelton, energy specialist at ICAP in Durham, North Carolina.