The British economy shrank in April amid a dramatic decline in car production ahead of the original Brexit deadline, according to official figures.

According to the Office for National Statistics, gross domestic product (GDP) plunged by 0.4% in April from a month earlier as factories across the country launched a wave of planned shutdowns to avoid any disruption that could have been unleashed by a no-deal Brexit.

Britain’s manufacturers planned around leaving the EU on 29 March as Theresa May took the country to the brink of leaving without a deal, before agreeing an extension until 12 April and then delaying the process until the end of October. She then agreed to stand down as prime minister, triggering the Conservative leadership contest.

While economic growth had strengthened as factories rushed to stockpile materials ahead of the deadline, the latest snapshot from the economy shows that production slumped after the target date passed. The decline is the worst monthly GDP performance for the UK since March 2016.

Rob Kent-Smith, the head of GDP at the government statistics agency, said the decline was caused by falling car production amid the uncertainty over leaving the EU.

“There was also widespread weakness across manufacturing in April, as the boost from the early completion of orders ahead of the UK’s original EU departure date has faded,” he said.

Manufacturing output across the country dropped by 3.9% on the month, driven by car production plunging by 24%. It comes after stronger growth in manufacturing in February and March, before falling back after the early completion of orders was not replaced and factories were closed to protect against potential Brexit disruption.

While UK car manufacturers have struggled amid faltering demand for exports from China and elsewhere overseas as the world economy slows, and from tighter restrictions on diesel engines, several firms said they would temporarily halt activity due to Brexit, while some said they would ultimately close factories altogether, with thousands of job losses.

Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk

Jaguar Land Rover staged a week-long factory shutdown as part of its plans for Brexit in April. BMW and Peugeot also brought forward annual maintenance stoppages that usually take place in the summer.

The Society of Motor Manufacturers and Traders (SMMT) said earlier this month that car production fell by almost half in April, with an “extraordinary” drop from 127,970 cars rolling off production lines in April 2018 to 70,971 this year, a fall of 44.5%.

Over the three months to April, the rate of growth slowed to 0.3% from 0.5% in the first three months of the year, when stockpiling had helped boost the economy.