LONDON (Reuters) - British factories ramped up their stockpiling in December as they prepared for possible border delays when Britain leaves the European Union in less than three months’ time, a survey showed on Wednesday.

An employee operates a forklift to move goods at the Miniclipper Logistics warehouse in Leighton Buzzard, Britain December 3, 2018. REUTERS/Simon Dawson

The IHS Markit/CIPS Manufacturing Purchasing Managers’ Index (PMI) rose to 54.2 from an upwardly revised 53.6 in November, the highest reading in six months and stronger than all forecasts in a Reuters poll of economists.

Markit said the improvement did not herald a big change in the outlook for Britain’s stuttering economy and was caused in large part by manufacturers stockpiling inputs and finished goods, both of which were near record highs.

“Any positive impact on the PMI is likely to be short-lived, however, as any gains in the near-term are reversed later in 2019 when safety stocks are eroded or become obsolete,” IHS Markit director Rob Dobson said.

Many manufacturers are building up inventories to protect themselves against the risks of customs delays at the border after March 29 when Britain is due to leave the EU.

Prime Minister Theresa May is struggling to overcome deep opposition to her Brexit plan in her own Conservative Party, raising the risk that no transition period will be provided to ease Britain out of its four decade-long membership of the EU.

“The rush to stockpile goods ahead of Brexit ... is now in full swing. The absence of any New Year joy from the European PMI data also confirms that the near future holds a bumpy ride for UK manufacturers,” said Francesco Arangeli, an economist at the EEF manufacturing association.

The euro zone manufacturing PMI fell to its lowest since February 2016 last month, and a Chinese PMI contracted for the first time in 19 months.

The average reading for the manufacturing PMI in the three months to December was the weakest since the period just after the Brexit vote.

While the slowdown in Britain’s economy since the Brexit referendum in 2016 has not been as sharp as some forecasts made at the time, the country has lagged behind stronger growth in other economies.

Last month, the Bank of England cut its forecasts for quarterly growth to just 0.2 percent in the last three months of 2018 and the first quarter of 2019. It has warned that a worst-case Brexit could push Britain into a deep recession.

Wednesday’s survey suggested manufacturing output shrank slightly in the fourth quarter of 2018.

Export orders last month were their strongest since May after contracting in November and October, again partly reflecting stockpiling to mitigate Brexit disruption.

On prices, input cost inflation eased to a two-and-a-half- year low in December.