St Andrews Castle is among the most visited paid-for heritage attractions in the country as summer visitor numbers soar.
Almost 37,000 people flocked to the historic structure perched on the Fife coast between April and July this year, an increase of 8% on last year’s figures.
The 450-year-old castle is now the eighth most popular attraction run by Historic Environment Scotland.
The list is topped by Edinburgh Castle with 755,001 visitors during the same four month period, followed by Stirling Castle which attracted 215,461 people.
Doune Castle in Perthshire was in fifth place with 40,751 people visiting.
Others in the top 10 were Urquhart Castle, Skara Brae, Linlithgow Palace, Iona Abbey, Fort George and Melrose Abbey.
Although it did not make it into the top 10, a second St Andrews landmark also proved popular this year,.
The town’s ancient cathedral saw visitor numbers jump by 18% compared to last year to 22,128.
Stephen Duncan, director of commercial and tourism at Historic Environment Scotland, said: “This season has brought with it a raft of impressive new records and achievements for a number of our Historic Scotland attractions.
“With just under two million people turning out at our castles, palaces and abbeys and other historic sites throughout the country over a four month period, it’s proving to be a season for the record books.”
Built in the 16th century, St Andrews Castle has a colourful past.
It was involved in the Protestant Reformation struggle, was a bishop’s palace, a fortress and a state prison.
The assassination of Cardinal Beaton sparked the siege of 1546-47 when opposing sides dug a remarkable mine and countermine into the rock close to the castle battlements.
St Andrews Cathedral, at 391 feet long, is the largest church to have been built in Scotland and the centre of the Medieval Catholic Church in Scotland.