Edinburgh Castle is an ancient fortress which, from its position atop Castle Rock, dominates the sky-line of the city of Edinburgh, and is Scotland's second most visited tourist attraction, after the Kelvingrove Art Gallery and Museum in Glasgow. Human habitation of the site is dated back as far as the 9th century BC. As it stands today though, few of the castle's structures pre-date the 16th century, with the notable exception of St Margaret's Chapel, the oldest surviving building in Edinburgh, which dates from the early 12th century.
As with all castles, Edinburgh's fortress has been a centre of military activity. As an ancient fortress Edinburgh Castle is one of the few that still has a military garrison, albeit for ceremonial purposes, and the official headquarters of the Royal Regiment of Scotland and 52 Infantry Brigade, as well as home to the regimental museum of the Royal Scots and Royal Scots Dragoon Guards.
The Governor of the Castle has always been the head of the Army in Scotland. Direct administration of the castle by the Ministry of Defence only came to an end in 1923 when the army formally moved to the city's new Redford Barracks. Nevertheless, Sentries still stand watch at the castle gatehouse between 6pm and 9am, with responsibility for guarding the Honours of Scotland.