Edinburgh Castle is built like a fortress at the plug of an extinct volcano. The castle has overlooked the city of Edinburgh since the reign of King David in the twelfth century, although traces of human habitation at the site date back to more than nine centuries before Christ. There was evidence of a castle before the reign of King David, when the construction was referred to as the Maiden’s Castle. In the 16th century historian John Stow maintained that there was a Maiden’s Castle as early as 989 BC – the name Maiden’s Castle was retained until the sixteenth century and the name may have referred to the ancient legend of nine maidens.
Prior to the reign of King David, it was not Edinburgh that was the seat of power in Scotland, but Dunfermline. King David made substantial changes that resulted in a fortress like castle and moved the royal seat of power to Edinburgh, of the original stone buildings, St. Mary’s Chapel at the summit remains. The castle came under English rule for the first time in the 13th Century, when King Edward 1st laid siege and gave rise to the first Scottish War of Independence. The castle was again under siege by the English in the 15th century but the army ran out of supplies and had to retreat. The site of the castle was a residence for royalty until James the sixth of Scotland ascended the throne of England in1603 and became king of both Scotland and England.
During its long history Edinburgh castle has been at the centre of many conflicts, starting with the Scottish wars of independence in the 14th century and carrying on through to 1745 and the Jacobite risings. The castle was in a state of siege many times during its history and in the Lang siege of 1573 the garrison ran out of water. Edinburgh castle became a military base with a large garrison from the end of the seventeenth century and in the 19th century was officially recognised as an historical monument.
Over the years the castle had been used to hold prisoners of war, but the authorities found it was no longer suitable as a prison when 49 prisoners escaped through a hole in the south wall in 1811. The Crown of Scotland was retrieved from the crown room by Sir Walter Scott in 1818 and put on display for the public. Works carried out during the 1880s saw the Argyle Tower and the Great Hall, which had been used as army barracks for years, restored to their intended state. Responsibility for the castle was transferred to the Office of Works in 1905 and troops were finally moved out Redford Barracks in the south west of the city in 1923.
During the First World War the castle was used once more to hold prisoners and held Luftwaffe pilots in the Second World War. Since 1991 the castle has been the responsibility of Historic Scotland and now has the highest level of protection for an ancient monument in Scotland.