Scotland's national museum is the first venue north of the Border to break into the UK's top 10 visitor attractions.

New figures show that free venues prospered in 2012, headed by the National Museum of Scotland in Edinburgh with 1,893,521 visitors – up 29.11% – putting it in ninth place in the UK.

The Kelvingrove Art Gallery and Museum in Glasgow, which is also free to enter, was up nearly 6% to 1,037,594 visitors, but Edinburgh Castle dropped by more than 5.5% to 1,230,177. Historic Scotland, which runs the site, blamed the recession and poor weather.

Overall, 12 of the 30 attractions in Scotland saw an increase in visitor numbers, according to the Association of Leading Visitor Attractions (Alva), with the biggest rise being at the Scottish National Portrait Gallery.

This free gallery saw a probably unrepeatable 520% jump in visitors, comparing September 2011 – when it was closed while a £17.6 million refurbishment was completed, and September 2012.

In Glasgow, the People's Palace had a 24.6% rise and the Museums Resource Centre was up 23.5%. The city's museums and galleries had a combined total of 3.4 million visitors, worthy of fifth place in the UK rankings if counted together.

Alva claimed the poor weather last summer hit outdoor attractions the hardest. Of the 30 UK venues that saw a double-digit decline, 27 were either gardens or outdoor attractions.

Bernard Donoghue, Alva's director, said: "It was the weather rather than the displacement effect of the Olympic and Paralympic Games that took its toll on gardens or outdoor attractions throughout Scotland."

He added high petrol prices also put people off travelling to rural locations.

Gordon Rintoul, director of National Museums Scotland, pointed out 2012 was the venue's first full year of operation since its £47m transformation.

He said: "Our commitment and investment to this project has been rewarded with a leap into the top 10 UK visitor attractions, the first time a Scottish attraction has achieved this.

"Visitor numbers rose by almost 30% over 2011, and more than doubled when compared to 2007, prior to redevelopment.

"Almost 1.9m visitors came through our door in 2012, more than visited Westminster Abbey or Tate Britain. It demonstrates that Scotland has world class attractions and that National Museums Scotland is leading the sector."

Edinburgh Castle was the second most popular paid-for attraction outside London and the most popular paid-for attraction in Scotland with 1,230,177 visitors.

Stephen Duncan, the director of commercial and tourism for Historic Scotland said: "We've enjoyed three consecutive, highly positive years in terms of visitor numbers – including record-breaking visitor figures in 2011 – and had expected a flattening out of our visitor numbers this year. We, like other organisations across Scotland and the rest of the UK, are operating within an ongoing recession and last summer faced the worst weather for over 100 years, which affected many outdoor attractions, so we are thrilled to have welcomed more than 1.2m visitors through the castle doors."

Councillor Archie Graham, the chairman of Glasgow Life, which runs Glasgow's museums and galleries, said: "Glasgow's civic museums enjoyed almost 3.4m visits in the last year.

"For more than three decades, the city has recognised the importance of investing in our museums' treasures, not only for our citizens but in confirming Glasgow's status as a world-class cultural destination."

Culture Secretary Fiona Hyslop, said: "Despite last year's wet conditions, several Scottish attractions performed spectacularly well – demonstrating that Scotland is a fantastic visitor destination whatever the weather.

"In particular, the recently refurbished National Museum of Scotland and Scottish National Portrait Gallery recorded massive increases in visitor numbers, and the National Museum is the first Scottish attraction ever to appear in the UK top 10. The Scottish Government made a significant financial contribution to both of these renovation projects and our investment is clearly paying dividends for the nation.

"That is why we are continuing to invest in our museums and galleries. We also remain committed to investing in capital projects such as these to support economic growth and create more jobs."