By Charles Riley, CNN Business

The UK economy could be headed for its first quarterly contraction since late 2012 after uncertainty over Brexit caused a sharp slowdown in manufacturing.

Britain's economy shrunk by 0.4% in April, according to official data published Monday that was even more dire than economists had expected. The data also showed a 0.1% contraction in March.

"The clear message is that underlying growth is pretty sluggish," said Ruth Gregory, a senior economist at Capital Economics, who added that it's possible the economy will shrink in the second quarter.

Manufacturing was hardest hit in April. Three years after the Brexit referendum, UK-based companies still have no idea what their future terms of trade will be with the European Union, which accounts for about half of British goods exports. Recent surveys suggest EU customers are taking their business elsewhere.

Factory output plunged 3.9% over the previous month, according to the data. Auto production fell 24%, the most on record, as carmakers idled factories around the original March 29 deadline for Brexit.

Rob Kent-Smith, an official at the Office for National Statistics, said there had been "widespread weakness" across manufacturing as a boost from stockpiling ahead of the departure date faded.

Production of chemicals, pharmaceutical products and basic metals also declined in April, according to the statistics agency.

Companies have begged the British government for clarity on Brexit. Instead, two deadlines for leaving the European Union have come and gone and the country is sliding deeper into a political crisis.

Prime Minister Theresa May is stepping down, and it's not clear when — or if — Brexit will happen, and on what terms. Some of her potential successors have suggested leaving the bloc on October 31 — the latest deadline -— without a deal to protect trade.

Meanwhile, the economic pain is likely to continue.

Survey data covering the services, manufacturing and construction sectors for May reinforces the conclusion that the UK economy is grinding to a halt.

"With the Brexit paralysis and a slowing global economy taking its toll, we doubt GDP will grow by much more than 1.5% or so in 2019 as a whole and expect interest rates to remain on hold until the middle of next year," said Gregory.