Manufacturing activity grew at the slowest rate in almost three years in May, as fears about Britain's EU referendum weighed on the euro zone's fastest-growing economy. 

Investec's Manufacturing Purchasing Managers' Index fell to 51.5 in May from 52.6 in April. 

But the index remained above the 50 line that separates growth from contraction for a 36th month.

Investec said that at least some of the poor performance in the sector was related to the June 23 referendum on the UK's place in the European Union and sterling's recent weakness.

"With momentum appearing to be building behind the 'Remain' campaign, sterling has recently begun to strengthen against the single currency, which augurs well for the near-term outlook for many Irish exporters," said Philip O'Sullivan, chief economist at Investec Ireland. 

"Assuming that our base case that UK voters choose to remain in the EU comes to pass, we suspect that conditions for Irish manufacturing firms should pick up in Q3 and beyond," he said.

Today's index showed that new export orders contracted after 34 months of consecutive growth, the survey found. 

The UK is Ireland's largest trading partner, with €1.2 billion worth of goods and services traded each week. Investec said around one-seventh of Irish merchandise exports go to Britain. 

The survey also showed pressure on margins, with input prices increasing while output prices continued to fall. 

The economy outperformed the rest of the euro zone for the second time last year, with gross domestic product growing by 7.8%. The government has forecast growth of 4.9% this year.