Scotland's visitor attractions received over 30 million visits during 2017, a rise of 9.7% over the previous year.
The National Museum of Scotland and Edinburgh Castle each attracted more than two million visits - a first for any Scottish attraction.
Edinburgh continued to dominate the marketplace, with 11 of the top 20 attractions located in the city.
The Association of Scottish Visitor Attractions (ASVA) looked at 232 sites with 77% reporting increased visits.
It is the fourth year running that an increase has been recorded with the latest figures on top of a 6% rise for attractions in 2016, which itself followed a 3.4% rise in 2015.
Sectors which fared particularly well in 2017 include castles and heritage sites (+14.7%), gardens (+13.6%), distilleries/whisky-related attractions (+11.8%) and museums and galleries (+7.5%).
Attractions in the vicinity of Loch Ness, including the medieval fortress of Urquhart Castle and the Loch Ness by Jacobite scenic cruises, continued to demonstrate above average growth.
Both attractions received a boost of 30,000 visitors per year, thanks to a partnership with a tour operator specialising in the Chinese market.
The "Outlander" effect continued to benefit many sites featuring in the cult TV series, as well as others with Jacobite connections.
Large increases in visitor numbers were recorded at attractions including Culloden Battlefield Visitor Centre (+ 28%), Glasgow Cathedral (+31%), Castle Fraser (+49%) and Glenfinnan Monument (+58%).
Malcolm Roughead, VisitScotland chief executive, said:"Scotland's visitor attractions are a valuable part of our country's outstanding tourism offering, showcasing our rich history and sharing Scotland's story with visitors from far and wide.
"The continued impact of the Outlander effect and the growing popularity of whisky tourism are also positioning Scotland as an unmissable destination for film and food and drink experiences."
The National Museum of Scotland welcomed the most visitors while Edinburgh Castle retained its status as the most popular paid attraction.
Dr Gordon Rintoul, Director of National Museums Scotland said: "It is terrific news that the latest ASVA visitor figures have confirmed that the National Museum of Scotland is again the most popular visitor attraction in Scotland.
"In 2017 we welcomed almost 2.2 million visitors - the first time we have attracted over 2 million in a calendar year."
Overall, some 59% of all visits were made to attractions that featured in the top 20 list.
Another area of Scotland which fared well in 2017 was the Highlands where Inverewe Garden in Wester Ross enjoyed a major uplift in visitor numbers (+110%), driven in part by the popularity of the North Coast 500 touring route.
Douglas Walker, chairman of ASVA said: "These figures demonstrate that the visitor attractions sector in Scotland is in robust health."
According to Visit Scotland, spending by tourists generates around £12bn of economic activity in the wider Scottish supply chain and contributes around £6bn to Scottish GDP.
Cabinet Secretary for Culture, Tourism and External Affairs Fiona Hyslop said: "Tourism is of vital importance to communities throughout Scotland, stimulating economic growth and promoting the importance of our cultural heritage to a wider audience.
"These latest figures demonstrate that our visitor attractions are continuing to create quality experiences, helping build our reputation as a premier tourism destination for people from around the world."
Top 20 Visitor Attractions
National Museum of Scotland - 2,165,601 (+19.6%)
Edinburgh Castle - 2,063,709 (+16.0%)
Scottish National Gallery - 1,600,761 (+3.7%)
Riverside Museum - 1,355,359 (+7.7%)
Kelvingrove Art Gallery and Museum - 1,304,072 (+3.6%)
St Giles' Cathedral - 1,285,654 (+9.7%)
Royal Botanic Garden Edinburgh - 904,956 (+5.6%)
Famous Blacksmith's shop - Gretna Green - 812,177 (+2.2%)
National War Museum - 764,079 (+12.5%)
Edinburgh Bus Tours - 690,082 (+14.1%)
Gallery of Modern Art - 670,485 (+3.7%)
Scottish National Gallery of Modern Art - 605,766 (+20.2%)
Stirling Castle - 567,259 (+17.7%)
The Falkirk Wheel - 521,710 (-3.1%)
Edinburgh Zoo - 556,356 (-3.8%)
Urquhart Castle - 488,136 (23.1%)
Glenfinnan Monument - 396,448 (57.8%)
The Royal Yacht Britannia - 390,482 (12.1%)
Glasgow Cathedral - 389,101 (31.4%)
The Scotch Whisky Experience - 378,954 (16.2%)