THE ‘Outlander effect’ has boosted visits to historic sites in Scotland to record levels.

The historic sites manned by the staff of Historic Environment Scotland (HES) have reported an increase in footfall to 5,220,049 people in 2018, a five per cent increase on 2017.

The Amazon Prime series Outlander, the time-travel historical drama based on the best selling books by Diana Gabaldon, is shot at various locations, including Doune Castle, Craigmillar Castle, Blackness Castle, Linlithgow Castle and Aberdour Castle: all have experienced record years.

The most-visited staffed site was Edinburgh Castle with 2,111,578 visitors, a figure which is a rise of 2% on the previous year.

Stirling Castle was the second-top visited site with 605,241 visitors, up 7%, followed by 518,195 visitors to Urquhart Castle.

This is the first time Urquhart Castle has welcomed over 500,000 visitors in a single year, and represents a rise of 6% in visitors.

Blackness Castle reaching 50,000 visitors for the first time – an increase of 36% from the previous year.

The 15th century fortress is the setting for the Fort William headquarters of “Black Jack” Randall in the series, while Doune Castle is the location for the fictional Castle Leoch in the series.

Outlander premiered in 2014, and much of its filming is done in Scotland, on location at historic sites, including the Old Town of Edinburgh, as well as purpose-built studios in Cumbernauld.

The show, which stars Sam Heughan as Jamie Fraser and Caitriona Balfe as Claire Randall in its lead roles, has been a success for its producers Starz: they have agreed to make fifth and sixth seasons.

HES also had a record number of memberships in 2018 which peaked at over 200,000 – up from 5% in 2017.

In total, 12 of the top 20 visited sites run by the HES registered record attendances.

Sites staffed by the HES, they reported, generated £620m of local tourism expenditure in 2018 – up £30m from 2017 - and supported more than 18,000 full time equivalent jobs.

Stephen Duncan, its director for commercial and tourism, said: “2018 was another fantastic year for Scotland’s heritage sites, with visitor numbers continuing to grow.

“As well as the ‘Outlander effect’ bringing international visitors to Scotland to explore its rich history, we have also seen an increase in the number of Scots visiting heritage sites as evidenced in our highest ever membership figure.

“With Scotland being used as a filming location for productions such as Outlaw King and Mary Queen of Scots, we hope visitors will continue to be inspired to explore the history of the sites they see on the big screen.”

Some of the HES sites were boosted by having the Lego exhibition, Brick Wonders, at their location: notably Glasgow Cathedral, Aberdour Castle, Arbroath Abbey and Stirling Castle.

HES added that bad weather, which was dubbed the Beast from the East, affected sites at the beginning of 2018, but overall there had been a steady increase in footfall.

HES looks after 300 heritage sites in total, including 77 staffed Historic Scotland sites.

Mr Duncan added: “These incredible figures show the importance that the historic environment has on local communities with the vast majority of economic growth generated by the increase in high-spending international visitors.

“From abbeys in the Borders to Norse settlements in Shetland, the appeal of Scotland’s cultural heritage reaches far and wide and is there to be enjoyed by all.”

HES has made some investments in some of the sites.

This includes a £332,000 investment project at Edinburgh Castle.

He added: “Another commitment was to reach new audiences, particularly with the Year of Young People.

“We launched Knight at the Castle, the first after-hours event at Edinburgh Castle targeting young people, and our touring LEGO exhibitions were a huge success across our regional sites with Aberdour Castle seeing a 42% increase in visitors from the previous year.”

Fiona Hyslop, the culture secretary, said: “I would like to thank all those who contribute to caring for our precious and unique heritage.

“Scotland’s historic environment is a catalyst for economic growth – driving tourism, regeneration and sustainable development, and fuelling improvements.

“I am delighted Historic Environment Scotland has seen an increase in visitors and memberships.”

The top ten attractions according to HES are: Edinburgh Castle, Stirling Castle, Urquhart Castle, Glasgow Cathedral, Doune Castle, Skara Brae (which saw a 2% rise), Linlithgow Palace, St Andrew’s Castle. Fort George and Iona Abbey.