BUSINESSES desperately stockpiling goods to prepare for a no-deal Brexit will wipe hundreds of millions of pounds from Scotland’s economy over the next few years, the Scottish Government's chief economist has said.

Dr Gary Gillespie said the country's economic growth would initially experience a boost as firms rush to prepare for the UK crashing out of the European Union.

But this "would be more than offset" as investment falls over the next four years, hitting GDP growth.

Dr Gillespie’s latest State of the Economy report, which summarises key performance data, found Brexit remains a key concern.

Outlining potential obstacles, he wrote: "Businesses may delay or defer decisions on new investment and consumers reduce or postpone spending.

"At the same time, the nature of investment may change as firms seek to bring forward investment to protect supply chains and identify alternative routes to service customers and key markets."

The top economist added: "As noted previously, building stock inventories in advance of March 2019 may bring forward economic activity to this side of EU exit.

"Our new analysis suggests that while this could potentially boost Scottish GDP growth in 2018-19 by up to 0.4 percentage points, this would be more than offset by a slowing of output in subsequent quarters.

"The overall effect of stockpiling on the economy is negative in the medium term."

Last month, the Centre for Economics and Business Research (CEBR) said UK firms will have stockpiled an extra £38 billion of goods by the time Brexit happens.

It argued that while this would boost GDP in the short-term, a post-Brexit "mini recession" was almost inevitable.

Meanwhile, Dr Gillespie's analysis found overall consumer attitudes have been negative since the EU referendum.

He wrote: "Despite sentiment regarding individual household finances strengthening, attitudes to spending remain weak and households' expect the economy to deteriorate over the next year.

"Therefore a broader Brexit risk remains, which if transmitted into a significant fall in household confidence and consumption could have a material impact on the economy."

The report notes Scottish GDP grew 0.5% between April and June 2018, a marginal increase on the 0.4% the previous quarter and above the rate of the UK as a whole.

This improvement was attributed to strong export growth on the back of a weaker pound and the rising value of oil.

Scotland's labour market has also performed well, with unemployment close to record lows.

Economy Secretary Derek Mackay said: "With Scotland’s economy continuing to grow throughout the year, it’s good to see the improving outlook for the oil and gas sector coming to fruition alongside the continued strong performance in our labour market.

“Scotland’s economy is strong and we are one of the top destinations for inward investment, whilst Scottish productivity has grown faster than the UK’s over the past decade.

“We are using the powers we have to boost the economy and ensure our economic potential is realised at the same time as we try to mitigate the damage Brexit will cause.”