The UK has avoided falling into a recession after the economy eked out 0.3 per cent growth in a sluggish third quarter of the year marred by Brexit uncertainty and a global slowdown.

Economists had forecast 0.4 per cent growth, partly thanks to a temporary lift from companies stockpiling goods ahead of Boris Johnson’s “do-or-die” Brexit deadline of 31 October – which has now been postponed. But the latest official figures suggested no stockpiling boost materialised.

Growth came in at just 1 per cent in the third quarter compared to the same period 12 months ago – the worst annual performance since early 2010 in the wake of the Great Recession.

There were further signs that will worry the prime minister and his chancellor, Sajid Javid. Much of the third-quarter growth came in a strong July, before the economy slowed to a 0.1 per cent contraction in September. All major sectors either flatlined or contracted during the month.

Monthly figures are more volatile than longer-term measures but the Office for National Statistics said that the underlying momentum in the UK economy “shows some signs of slowing”.

Gross domestic product (GDP) shrank 0.2 per cent in the second quarter of the year and a further contraction between July and September would have meant a recession and dealt a major blow to Mr Johnson’s hopes of securing a victory in next month’s general election.

The service and construction sectors provided positive contributions to GDP growth, despite recent surveys indicating that they were flat or shrinking.

An ONS spokesperson said: “Services again led the way with construction also performing well. Manufacturing failed to grow as falls in most industries were offset by car production bouncing back following April shutdowns.”

Services, which account for about four-fifths of the UK economy, grew 0.4 per cent in July to September compared with the previous three months, while construction grew 0.6 per cent.

Manufacturing did not grow but bounced back from a slowdown in the third quarter (ONS)

The figures were boosted by a comparison with a very weak April, in which the economy was dragged down in the wake of the previous Brexit deadline of 29 March.

“With the election just under five weeks away, clearly this isn’t the good news the government might have hoped for,” said Ruth Gregory, senior UK economist at Capital Economics. “And further weakness is likely to be in store in Q4 – we have pencilled in a 0.2 per cent Q/Q rise.

“Unless Brexit uncertainty fades and a fiscal boost is forthcoming, then this might make the Bank of England more inclined to cut interest rates before long.”

Business groups also showed little sign of optimism.

Tej Parikh, chief economist at the Institute of Directors, said narrowly avoiding a recession was “nothing to celebrate”.

He added: “While high employment has provided some support for the economy, underlying weaknesses in investment and productivity still need addressing.

“With uncertainty likely to persist and a continued slowdown in global markets, the onus is on the new government to stimulate economic activity and move the UK beyond its current yo-yo pattern of growth.”

John McDonnell, Labour’s shadow chancellor, pointed out that over the last six months growth has now totalled just 0.1 per cent. The fact that the government would be celebrating this is a sign of how low ministers' hopes for the economy are, Mr McDonnell claimed.

He added: "Labour will build a high-wage, high-skill economy by investing for growth in every region and nation of the UK."

The figures came after ratings agency Moody’s warned that it could cut the UK’s credit rating because: “The increasing inertia and, at times, paralysis that has characterised the Brexit-era policymaking process has illustrated how the capability and predictability that has traditionally distinguished the UK’s institutional framework has diminished.”

Moody’s added: “The decline in institutional strength appears to Moody’s to be structural in nature and likely to survive Brexit given the deep divisions within society and the country’s political landscape.”

Last week, two Bank of England policymakers signalled their own worries for Britain’s economic prospects by unexpectedly voting to cut interest rates from 0.75 per cent to 0.5 per cent.