Foreign visitors in the 12 months to June rose by 7%, while the number of people coming north of the Border from other parts of the UK was up by 3%.
It came after VisitScotland this week reported sharp falls in demand from within Scotland, the rest of the UK and overseas in the third-quarter of the year.
Tourism Minister Fergus Ewing said spending had gone up by 14% over the same period.
He added: "Tourism is one of Scotland's key industries and as these figures show it continues to make a major contribution to Scotland's economy, with more people visiting and spending more in our accommodation, visitor attractions and restaurants.
"We want Scotland to be a destination of first choice for a high-quality, value for money and memorable experience, delivered by a skilled and passionate workforce, and the Scottish Government is working with VisitScotland and the industry to achieve this."
Mike Cantlay, chairman of VisitScotland, said: "These are encouraging figures, particularly in what continues to be a difficult economic climate."




