Edinburgh Castle was destined to become one of the city’s most iconic historical structures. It was officially recognised as a national heritage site in the early 19th century, leading to various restoration programmes over the years. Learn more at edinburgh-future.
Location and Early History
The castle is perched atop Castle Rock, an extinct volcano that was last active around 350 million years ago. The rock itself was first settled during the late Bronze Age, around 800 BC. The first definitive record of a castle on the site dates to the reign of King David I, who convened nobles and church officials within its walls from 1139.
The Wars of Independence
In 1296, during the First War of Scottish Independence, the castle was captured by English forces. Countless Scottish royal treasures, records, and the nation’s historical archives were seized and taken to England. The English held the castle until 14 March 1314, when a daring raid by just thirty Scottish warriors saw them scale Castle Rock and surprise the garrison.
During the Second War of Scottish Independence, the castle was once again taken by the English in 1335. However, in 1341, the Scots, led by Sir William Douglas, managed to reclaim it. The recapture was achieved through a clever ruse. Douglas disguised himself as a merchant and arranged with the castle’s governor to bring his goods directly into the fortress. On 17 April 1341, Douglas and twelve of his men, disguised as sailors, arrived at the castle gates. When the gates were opened for them, they launched an attack on the guards. With reinforcements arriving, the rest of the English garrison was defeated.
A New Role and the ‘Lang Siege’
In the 15th century, the castle’s role shifted. It became a key arsenal and weapons manufactory, while the Scottish monarchs moved their primary residence to Holyrood Abbey. In April 1571, the castle was occupied by Sir William Kirkcaldy of Grange. He had been the keeper of the castle for Mary, Queen of Scots, and after her abdication, he refused to recognise her infant son as king. The castle was besieged by Mary’s opponents in a standoff that lasted two years and became known as the ‘Lang Siege’ (Long Siege).
After a truce brokered by England’s Queen Elizabeth I expired on 1 January 1573, Kirkcaldy began bombarding the town. In response, Elizabeth sent troops to aid the besiegers. An intense bombardment of the castle began on 17 May, and by 22 May, its south wall had been destroyed. On 26 May, English forces captured the outer fortifications, finally forcing Kirkcaldy to surrender. He and his brother were subsequently hanged.
Centuries of Sieges
During the ‘Bishops’ Wars’ in 1640, Covenanter forces besieged the castle garrison. After a three-month siege, the garrison surrendered once their supplies ran out. The siege caused serious damage to the outer fortifications, which were later demolished. After his victory at the Battle of Dunbar on 3 September 1650, Oliver Cromwell’s forces laid siege to the castle, with the garrison again surrendering after three months. In 1689, during the conflict between supporters of William of Orange and James II, the castle was besieged by William’s supporters, and the garrison surrendered after a three-month siege.
The Jacobite Risings
During the Jacobite Rising of 1715, rebels, aided by traitors within the garrison, attempted to scale the castle walls. However, the ladders provided were too short for the task. They were spotted after a change of the guard, and the rebels were forced to retreat. The castle’s final involvement in military action was during the Jacobite Rising of 1745. Rebels occupied Edinburgh but lacked the heavy artillery needed to assault the castle. As a result, the fortress remained in the hands of government troops.
A New Purpose

In the following period, the castle was primarily used as a prison. However, a military garrison remained stationed at the castle right up until 1923.