The museum benefited from a 48 per cent increase in visitor numbers in 2021, compared to the previous 12 months, during another year when attractions had to grapple with Covid-closures, physical distancing restrictions and rules on face coverings.
It won back first place from the Royal Botanic Garden in Edinburgh and also retained its place in the UK top 20 compiled by the Association of Leading Visitor Attractions (ALVA).
However, the museum’s final tally of 660,000 was still significantly down on pre-Covid 2019, when it welcomed 2.2 million visitors.
Visits to Scottish sites were down 60 per cent on pre-pandemic levels, but the overall tally was 45 per cent up on 2020 compared to a 25 per cent increase across the UK.
Dr Chris Breward, director of the National Museum, said: "We worked hard to make our visitors feel as safe and inspired as possible when we opened our doors after lockdown and it’s wonderful to see more and more people back in the museum exploring, discovering and enjoying the history, natural heritage and shared humanity reflected in our collections.”
Kari Coghill, director of enterprise at the Botanics, said: “After a good year for business recovery, it is great to see our visit numbers up 43 per cent. However, there’s no room for complacency.
“Although we’re on the way back up, and events such as Christmas at the Botanics provide a great boost, Edinburgh is still missing visitors, particularly from overseas.
“That said, our January and February figures were strong, despite gales causing some disruption to opening hours.”
David Field, chief executive of the Royal Zoological Society of Scotland, which runs Edinburgh Zoo, said: “As a wildlife conservation charity, the support we have received over the past two years has been incredible.
"Every visit, donation, membership, purchase in our shops and more has helped feed and care for our amazing animals and fund vital conservation work around the world.
“With the warmer weather and brighter evenings approaching, we’re excited to offer a safe place for visitors to connect with nature and create new wildlife memories together.”
Edinburgh Castle, which was just 9,000 visitors behind the National Museum in 2019, claimed fourth place in the top five for the city as it saw its numbers increase by 53 per cent to 423,000.
Glasgow’s most popular attraction, the Riverside Museum, saw visitor numbers increase by 27 per cent.
Significant increases were reported at several National Trust for Scotland sites, including Culzean Castle and Country Park and Robert Burns Birthplace Museum in Ayrshire (up 78 per cent and 59 per cent respectively), and the Glenfinnan Monument, a huge draw for Harry Potter and Outlander fans, which saw an 80 per cent hike.
V&A Dundee saw a 29 per cent increase in visitors during a year in which it hosted a celebration of club culture around the world.
Gordon Morrison, chief executive of the Association of Scottish Visitor Attractions, said: “Overall visitor numbers to our member sites in 2021 were down over 60 per cent on pre-pandemic figures in 2019.
"Outdoor, family-themed attractions like Edinburgh Zoo bucked the trend and had a really good year, but for the majority of indoor attractions there was no opportunity to recover.
“We had to deal with restrictions such as physical distancing right through the main season till mid-August and even though our sector had the highest standard of mitigating measures in place, the combination of government messaging advising people to avoid crowded places and general consumer fears meant that it was impossible for much of the sector to viably trade.
“We were encouraged by the amount of domestic support that we saw last year. It was great to hear stories of some people visiting their local attractions for the first time and discovering that they had world-class visitor experiences on their doorstep.
"The lack of any meaningful international visitors did, however, bite and, as a result, our sector is in desperate need of a good 2022.”
A spokesman for Historic Environment Scotland, which runs more than 300 historic sites, including Edinburgh Castle, said: “Like many other areas, our sector has continued to experience challenging times, particularly with the continued impact of the pandemic, resulting in the closure of many sites and limited capacities on reopening for safety reasons.
“It also, of course, saw a decline in international visitors which form a core part of our market at a number of sites. We are seeing a slow return of international travel, but forecasts indicate these markets will take longer to recover.”
ALVA director Bernard Donoghue said: “These figures show that when people were able to leave their homes and go back to places that they loved they prioritised outdoor spaces, such as zoos, gardens and woodlands.
“Part of that was because they reopened first, but it was also down to the fact that people wanted to get back to nature to breathe, heal and recover.
“Indoor attractions also had to reopen with significantly reduced capacities. The great irony, which is still the case now, is that because international visitors have not been back in the same numbers they were in 2019 there has never been a better time to visit attractions as you are able to get up close and personal to their collections.”