Scotland's economy contracted in the last three months of 2016, new Scottish Government figures have shown.

In the final quarter of last year, output in the Scottish economy was down 0.2%.

If officials find the economy has contracted in the first three months of this year then the country will officially be in a recession.

During the same period, the UK economy as whole grew 0.7%.

The Scottish economy grew by only 0.4% in 2016 while the UK economy as a whole grew by 1.8%.

The figures do not include North Sea oil and gas, which experienced a difficult year with global energy prices remaining low compared to recent years.

Finance minister Derek Mackay blamed the contraction on the UK-wide vote to leave the European Union in June last year.

He said: "Scotland's economy faces continued headwinds, such as the slowdown in the oil and gas sector and weak global demand.

"Despite these challenges, the foundations of our economy are strong with growth in 2016, unemployment falling and early signs that the situation is improving for North Sea operators.

Mackay continued: "Before the EU referendum, the UK Government told us Brexit will make us 'permanently poorer'.

"What is now quite clear is the economic reality of the Brexit vote. We have already seen significantly lower consumer confidence in Scotland since the vote last summer.

"Now we see that feeding through into our growth figures and all of this is before the UK actually leaves the EU.

"It is also noteworthy that although these figures do not include offshore oil and gas production, the downturn continues to impact on the wider economy through the supply chain just as it has in Norway and Canada."

The UK Government's Scotland Office minister Lord Dunlop said the figures are a "real cause for concern".

He said: "There has been no growth over the past year and the gap between Scotland and the rest of the UK continues to grow.

"The UK Government is working hard to release our potential through the industrial strategy, city region deals and a £1.2bn funding boost for the Scottish budget.

"The economy in Scotland has huge potential but what we need now is for the Scottish Government to use their unprecedented powers to make Scotland more competitive and return its economy to growth.

"Of course the simplest way to provide more certainty for people and businesses across Scotland would be to take a second independence referendum off the table."

The Scottish Chambers of Commerce has called for urgent action to restore confidence in the country's economy.

Chief executive Liz Cameron said: "The news that Scotland's economy is contracting at a time when the overall UK economy is growing healthily must ring alarm bells for both the Scottish and UK governments.

"While Scotland's growth has been sluggish since the fall in oil prices in 2015, the evidence now shows that no sector in the Scottish economy is experiencing growth, with production and construction falling and our service sector flatlining."