The National Museum of Scotland overtook Edinburgh Castle to become the most popular visitor attraction in Scotland last year.
Figures from the Association of Scottish Visitor Attractions (ASVA) have shown that, in total, 1.81 million people visited the Edinburgh museum - a 15.5% rise on the previous year.
Edinburgh Castle welcomed 1.77 million people, up 13.4% on 2015.
Visits across Scotland rose for the third year running in 2016.
Almost 30 million visits were made to 249 of the ASVA members' sites in Scotland last year - a rise of 6% on 2015 figures.
The National Museum of Scotland opened 10 new galleries in July 2016.
Director Dr Gordon Rintoul said: "I am delighted that the latest ASVA visitor figures have confirmed the National Museum of Scotland's place as the most popular visitor attraction in Scotland.
"In addition, we recorded the highest-ever visitor numbers across all our sites with nearly 2.7 million visits."
Top 10 visitor attractions
1 National Museum of Scotland (free), Edinburgh - 1,810,948 visitors
2 Edinburgh Castle (paid) - 1,778,548 visitors
3 Scottish National Gallery (free), Edinburgh - 1,544,069 visitors
4 Kelvingrove Art Gallery and Museum (free), Glasgow - 1,259,318
5 Riverside Museum (free), Glasgow - 1,259,042
6 St Giles' Cathedral (free), Edinburgh - 1,171,793
7 Royal Botanic Garden Edinburgh (free) - 857,268
8 Gretna Green (free) - 794,543
9 National War Museum (free), Edinburgh - 678,982
10 Gallery of Modern Art (free), Glasgow - 646,567
Four other sites welcomed more than one million visitors each, with Kelvingrove Art Gallery and Museum and the Riverside Museum, both in Glasgow, attracting more than 1.25 million people each.
The Scottish National Gallery and St Giles' Cathedral, both in Edinburgh, drew 1.54 million and 1.17 million visitors respectively.
Eleven of the top 20 attractions were located in the capital, compared with nine in 2015.
Sites outside the top 20 were also successful in attracting more visitors.
The Black Watch Castle & Museum in Perth and Kinross saw a 1,248% rise in numbers, largely on the back of "Weeping Window", a sculpture featuring thousands of handmade ceramic poppies commemorating those who died in World War One.
Outlander TV series
Last year, 195,301 people visited the museum, up from 14,483 visitors in 2015.
In the Highlands, interest generated by the Outlander TV series helped boost visitor numbers at the Culloden Battlefield Visitor Centre, which rose 21% from 115,923 in 2015 to 139,691 last year.
Culture Secretary Fiona Hyslop said: "It is fantastic that Scottish visitor attractions recorded another successful year in 2016, with almost 30 million visits to some of Scotland's most popular and iconic tourist sites.
"I commend the sterling work of ASVA in creating quality visitor experiences and building Scotland's reputation as a top tourist destination for visitors from around the world."
ASVA chairman Douglas Walker said the figures demonstrated that the visitor attractions sector in Scotland was in "robust health".