One reason for travelling which saw hardly any change last year was foreigners visiting Scotland to see friends and relatives.

There was a fall in the numbers on inclusive tours, reaching only 15% of total visitor numbers.

Image copyrightAnne SimpsonImage caption
Skye's Fairy Glen is among the many places across Scotland tourists flock to

Image copyrightVisitScotlandImage caption
The North Coast 500 route has been marketed as one of the world's great road trips

The ONS data showed the number of overseas visitors to Scotland in 2017 rose to 3.2 million.

There were 1.9 million visits by European tourists and spending by these visitors from Europe increased by 36% to £1.1bn.

In contrast across the UK as a whole, the number of European visitors increased by 1% while spending fell by 1%.

There were more North American visitors than in 2016 - up from 398,000 to 443,000. But their spending was down by £38m.

Overall, the number of business travellers from the EU was up, as was their spend, however, the number of people coming for business trips or to work in Scotland from from the newer 13 members of the EU, including Poland, the Baltic states, and Bulgaria was down.

Although there was a fall in visitors on inclusive tours, there was an increase in the number from "rest of the world", including China and India.

Image copyrightGetty ImagesImage caption
As well as the scenery, overseas visitors come for Scotland's many festivals and cultural events

The Scottish government attributed the rise to factors including the popularity of the Scotland-set television series Outlander, digital campaigns by tourism agency VisitScotland, and events associated with the Year of History, Heritage and Archaeology.

The figures are published amid ongoing debate about the impact of tourism at popular destinations such as the Isle of Skye.

"Using our unrivalled beauty, rich history, pioneering partnerships and innovative thinking we are communicating with visitors from every corner of the world."

"Tourism is the heartbeat of the Scottish economy, causing a ripple effect which touches every industry and community, creating employment and economic growth."

'Quality, authentic experience'

Tourism Secretary Fiona Hyslop said the figures showed 2017 was "a record year for overseas tourists visiting and spending money in Scotland".

She added: "Tourism is one of our most important industries, employing 207,000 people, creating jobs, supporting the local economy and building on our strong international reputation.

"As we get closer to the UK's departure from the EU, we will continue to do all we can to ensure people from across the EU and elsewhere are welcome to work in our tourism sector and visit our beautiful, vibrant country."

A spokeswoman for the Scottish Tourism Alliance said: "Tourism businesses in Scotland are challenged in their ability to invest in delivering the experiences expected by today's visitor due to the rising costs and the current squeeze on domestic visitor spend.

"The instability around our future departure from the EU and issues such as the open skies agreement, movement of workers and the price of goods remains a key concern for most tourism businesses."

She added: "Our priority will be to continue to build the foundations for sustained growth for Scotland's tourism industry in partnership with VisitScotland, the Scottish government and its public agencies and ensure that every tourist who visits us leaves having enjoyed the quality, authentic experience which is at the heart of the Tourism Strategy."