Scottish exports fell by 5% between 2015 and 2016 as a rise in international trade failed to offset drops in goods and services being sent to the EU and rest of the UK, new official statistics show.
Total exports to the other parts of the UK and overseas, excluding oil and gas, fell £3.9 billion to £75.6 billion in 2016.
Within this, international exports rose by £460 million (1.6%) to £29.8 billion with but those being sent elsewhere in the UK fell by £4.4 billion (8.8%) to an estimated £45.8 billion.
The value of Scottish imports to the EU dropped by £105 million (0.8%) to £12.7 billion in 2016 while Scottish exports to non-EU countries rose by £565 million (3.4%) to £17.1 billion.
The rest of the UK continues to be Scotland's largest export partner, taking 61% of total exports in 2016 while the EU accounted for 17% and the rest of the world 23%.
A 22% rise in financial services exports along with a 5.3% rise in food and drink helped boost the international figures while a drop in utilities exports of more than a quarter drove the rest of the UK decrease.
The largest decrease in the EU exports was professional, scientific and technical activities - down 11.4%.
Economy Secretary Keith Brown praised the continuing increase in international exports, particularly for food and drink and professional and scientific services.
He said: "These figures do, of course, cover a year of considerable uncertainty with the EU Referendum, the downturn in the oil and gas sector and the closure of Longannet - all of which have had an impact on these historic figures.
"However it is clear that if the UK Government continues in its plan to withdraw from the European single market and the customs union, putting barriers in the way of international exports, that our economy could be severely damaged in future."
Scottish Secretary David Mundell said: "These figures from the Scottish Government again show that Scotland's trade with the rest of the UK is worth nearly four times that with the EU. We know that more than half a million Scottish jobs depend on the vital UK internal market.
He added: ""As the UK prepares to leave the EU, it is essential that we ensure the UK internal market continues unimpeded.
"The trade figures also show an increase of over half a billion pounds in exports to markets outside the EU. This demonstrates the opportunities that lie ahead for Scottish businesses, as we strike new, ambitious trade deals around the world."