Scotland’s busiest “paid-for” attraction has reported a 15 per cent increase in ticket sales in 12 months.
More than 800,000 more visitors are flocking to the landmark now than they were five years ago.
The heritage agency responsible for the castle has cited the first official Year of History, Heritage and Archaeology and the hit TV show Outlander, set and filmed in Scotland, as factors behind the increase. Also, increased numbers of overseas visitors are coming to the UK as a result of the weaker pound ahead of Brexit.
Historic Environment Scotland (HES) also revealed all ten of its most popular sites, including Stirling, Urquhart, Doune and St Andrews castles, have also had record years.
It said there was growing interest from around the world in sites with links to iconic figures from Scottish history such as Robert the Bruce, Mary, Queen of Scots and the Stuart kings.
Visitor numbers have soared at Edinburgh Castle every year since 2012 when they were badly affected by the London Olympics, with a 13 per cent increase being recorded between 2015 and 2016.
Reaching two million visitors could propel the castle into the league table of Britain’s top ten attractions, along with the likes of the British Museum, Tate Modern, the National Gallery and the Natural History Museum.
The National Museum of Scotland, a largely free attraction, said in mid-November it had attracted two million visitors for the first time.
It staged a major exhibition on Bonnie Prince Charlie and the Jacobites this year and offered the first chance for visitors to glimpse the “Galloway Hoard,” Britain’s single biggest discovery of Viking treasures, during a £2 million fundraising campaign to secure them for the nation.
Stephen Duncan, director of commercial and tourism at HES, said: “The Year of Heritage, History and Archaeology has given us a fantastic platform to highlight Scotland’s historic environment.
“The connections of the castle to Robert the Bruce, the Stuart Kings and Mary, Queen of Scots and the impact of dramatisations such as Outlander illustrate a long and romantic history, which attracts visitors from home and abroad.
“Globally, we’ve seen more visitors arriving in Britain and Edinburgh thanks to the strength of our air connections to other countries.
“Many of these visitors will have chosen to visit Edinburgh Castle due to its place as an international symbol of the city and of Scotland.
“We’ve seen a record-breaking summer for our sites across Scotland, which saw our ten most-visited sites – including Urquhart Castle and Skara Brae – record their busiest ever seasons, with Stirling Castle recently welcoming its 500,000th visitor of 2017.”
Malcolm Roughead, chief executive of VisitScotland, said: “Edinburgh Castle is one of the most awe-inspiring landmarks in the world.
“Sat high up on volcanic rock overlooking Edinburgh in all its magnificence, it is no surprise that it has broken through the two million visitor mark.
“In our recent survey, Edinburgh Castle was voted the best castle in Scotland by the British public and I’m not surprised at all.
“I hope that visitors keep on exploring Scotland’s fascinating heritage into 2018 and beyond.”
The castle’s record visitor numbers cover the period from 1 January to Christmas Eve.