
City of Edinburgh, United Kingdom · 1200 CE · United Kingdom
- The Castle Rock, a volcanic plug above the Old Town, has been occupied since the late Bronze Age or early Iron Age, and a royal castle has stood here since the time of Malcolm III of Scotland.
- Saint Margaret died here in 1093, and the chapel her son David I built is the oldest building in Edinburgh. It survived the slighting ordered after the castle was retaken in 1314.
- David's Tower, the Great Hall and the palace grew up as a Stewart royal seat, and the Lang Siege of 1571 to 1573 brought the medieval front down. The Half Moon Battery was built over the ruined tower.
- Mary, Queen of Scots, gave birth to James VI in the palace on 19 June 1566. The Honours of Scotland and the Stone of Destiny are kept in the Crown Room.
- The garrison held out in the Jacobite rising of 1745. The castle is still a ceremonial military post, the home of the Scottish National War Memorial, and one of Scotland's most visited paid attractions.
Visiting
The castle is open daily from 9.30am to 6pm from 1 April to 30 September, and last entry is at 5pm. From 1 October to 31 March the castle is open daily from 9.30am to 5pm, and last entry is at 4pm. On 24 December the castle closes at 4pm, and last entry is at 3pm. The castle is closed on 25 and 26 December.
On 1 January the castle opens at 11am, and last entry is at 4pm. An adult ticket for ages 16 to 64 costs £23.50 when booked online and £26 at the entrance. A concession ticket for a visitor aged 65 or over, and for a visitor who is unemployed, costs £19 online and £21 at the entrance, and this concession does not apply to students. A child ticket for ages 7 to 15 costs £11.50 online and £13 at the entrance.
Children under 16 are not allowed to enter unless they are accompanied by an adult. Tickets should be booked online in advance, because once the online tickets are sold out there are no further tickets at the castle. Admission is free for members who show a valid membership on arrival, and an online booking is needed to guarantee entry. Carers who accompany visitors with disabilities are allowed to enter free, and free tickets are limited to two carers.
A holder of a Young Scot card is allowed to enter for £1 and must show the card on arrival. English Heritage, Cadw and Manx members are allowed to enter at half price in the first year, and renewal members and life members are allowed to enter free, with an online booking required. Saint Margaret's Chapel is closed on Monday 16 November before 1.00pm, and entry is from 1.00pm. The Royal Scots Dragoon Guards Museum opens at 10.00am on Monday 16 November and at 11.00am on Friday 4 December.
History
Edinburgh Castle stands on the Castle Rock at the west end of the Old Town, a plug of hard dolerite left by a volcanic pipe about 350 million years ago. Cliffs fall away to the south, west and north, so the only gentle approach is from the east, along the ridge of the Royal Mile. The summit is 130 metres above the sea. The same rock that made the place strong also made water scarce, and the well ran dry in more than one siege.
Occupation reaches back to the late Bronze Age or the early Iron Age. Digging for a vehicle tunnel in the late 1980s and early 1990s found pits, hearths and paved surfaces about four metres down, read either as settlement from about 900 BCE or as traces too slight for a firm picture. Iron Age roundhouses, Roman brooches and pottery show a hill fort in contact with Roman Britain. Around 600 the poem of the Gododdin names Din Eidyn and a year of feasting before a doomed ride to Catraeth.
In 638 the Angles took the stronghold. The Scots held it again in the reign of Indulf, in the middle of the tenth century.
A royal castle is first described at the death of Malcolm III of Scotland in November 1093, when his widow Margaret died here within days of hearing that he had been killed. A later chronicle tells that story. A near-contemporary life of Margaret does not mention a castle. Their son David I made Edinburgh a seat of government and built the chapel dedicated to his mother, now the oldest building in the city.
In 1174 William the Lion surrendered the castle to Henry II. It came back in 1186 as the dowry of his queen.
The Wars of Scottish Independence made the rock a prize. Edward I took it in 1296 after three days of bombardment and removed records and treasures. Thomas Randolph recovered it by a night climb on 14 March 1314, and Robert the Bruce ordered it slighted. Only the chapel is thought to have survived.
The English held it again from 1335 until William Douglas retook it in 1341 by jamming a cart in the gate. David II then rebuilt, and David’s Tower rose on the site of the later Half Moon Battery. Its height is given both as over 30 metres and as 59 feet.
In November 1440 the young Earl of Douglas and his brother were killed after the Black Dinner in that tower. James III of Scotland was himself shut in the castle from July to September 1482 during his brother’s English-backed revolt. He had reigned since childhood, after his father was killed at Roxburgh in 1460, and he died at Sauchieburn in 1488. Mons Meg, the great bombard given to his father in 1457, became the castle’s most famous gun.
The Great Hall of James IV, completed around 1511, still keeps its medieval roof. He was killed at Flodden in 1513, and the royal household increasingly lived at Holyrood.
Mary, Queen of Scots, gave birth to James VI in a small room of the palace on 19 June 1566. After she was forced from the throne, Sir William Kirkcaldy of Grange held the castle for her in the Lang Siege. English guns broke David’s Tower in May 1573, and Grange was hanged. The Half Moon Battery and the Portcullis Gate are the rebuild that followed.
James VI restored the palace for his return in 1617, slept at Holyrood, and left for England in 1603. Charles I was the last reigning monarch to reside in the castle, in 1633.
Covenanters, then Cromwell, took the castle in the middle of the seventeenth century. From the Restoration until 1923 a garrison was kept here continuously. It nearly fell to a scaling party in 1715, when the ladder was too short. In the Jacobite rising of 1745 Charles Edward Stuart took the town but not the castle.
General George Preston bombarded the Jacobites until they gave up the blockade and marched south. The rising ended at Culloden the next spring.
The vaults then held prisoners of war until a mass escape in 1811 showed they were no longer secure. Walter Scott rediscovered the Honours of Scotland in 1818. Mons Meg came home from London in 1829, and the chapel was found again in 1845 after long use as a store. Nineteenth-century restorations, paid for in part by William Nelson and designed by Hippolyte Blanc, rebuilt the Great Hall and added the Argyle Tower and the gatehouse.
Alexander Nasmyth’s painting of 1824 remembers the castle above the Nor’ Loch after the water had already been drained. Alexander Carrick carved the Wallace statue on the gate and the figures of Justice and Courage for the Scottish National War Memorial, opened in Crown Square in 1927.
The memorial stands on the site of Saint Mary’s church and later barracks. Its rolls name the Scottish dead of the two world wars and of later conflicts, with totals given both near 135,000 and over 147,000 for the first war. The army left its main garrison in 1923 but still mounts a ceremonial guard. Bob Bruce (British Army officer) has been governor since September 2024.
The Stone of Destiny has lain in the Crown Room with the Honours since 1996. The One O’Clock Gun has fired a time signal since 1861.
The castle is part of the Old and New Towns inscribed in 1995, not an inscription of its own. Archaeology has continued in small watches, including a single stoneware sherd, possibly Siegburg ware, from a gatehouse trench in 2024, and no significant material in a trench on the Half Moon Battery. In 2025 the castle received 2,044,963 visitors.
Images









Detailed History
Edinburgh Castle stands on the Castle Rock in the Old Town of Edinburgh, a plug of dolerite left by a volcanic pipe that cut through softer rock about 350 million years ago. Ice could not wear the hard stone down, so the rock protected the ground to the east and left a crag and tail. The summit is 130 metres, or 430 feet, above the sea. Cliffs on the south, west and north rise about 80 metres, or 260 feet, above the ground around them, and the only gentle approach is from the east, along the ridge that became the Royal Mile.
The same hard rock that made the place defensible also made water difficult. Basalt does not let water through. A well sunk 34 metres, or 112 feet, still ran dry in drought and in siege, including the Lang Siege of 1573. A later survey of the Fore Well found it 110 feet, or 34 metres, deep, mostly cut through the rock.
People have used the rock for a very long time, and the earliest evidence does not agree in detail. Excavation in the late 1980s and early 1990s, also described as a campaign of 1987 to 1989 and as the excavations of 1988 to 1991, found fragmentary deposits about 4 metres down: pits, cobbled surfaces, soil hearths, a stone drain and objects of the Bronze Age. One reading takes those deposits back to about 900 BCE and treats them as proof of settlement for at least 3,000 years. Another reading places the first occupation in the late Bronze Age or the early Iron Age and says the finds were too slight for a firm conclusion about its size or character.
Later Iron Age levels produced the partial remains of three large timber roundhouses and broad paved surfaces. House fragments were also compared with Iron Age dwellings in Northumbria, and one reading of the same dig suggests a broch, of the kind known at Edin's Hall near Duns. Clear signs of life in the first and second centuries AD sit beside Roman pottery, bronzes and brooches, including a trumpet brooch and a dragonesque brooch. Those objects are evidence of contact with the Roman Empire and of a place of some standing, whether or not Roman armies themselves took an interest in the rock.
There is no record of interest here during Agricola's invasion near the end of the first century. Ptolemy's map of the second century shows a settlement of the Votadini called Alauna, a rock place, which may be this hill or another fort of the same people. Trade with Roman Britain is read from Agricola's northern campaign in AD 82 through to the Antonine Wall around AD 140.
At the Coal Yard, north of the later gatehouse, two ditches up to 13 metres wide and more than 10.7 metres deep are read as the defences of a hill fort. They still formed part of the castle's defences into the later Middle Ages. In places the Iron Age levels are sealed by middens left by British, Anglian and Scottish inhabitants from the second to the eleventh centuries. A separate reading of an early medieval midden, piled over dismantled Roman Iron Age structures, gives a radiocarbon range of about AD 449 to 598, with a decorated bone or antler comb of Anglian or Pictish form from the seventh to the tenth century and a fire steel that could belong to the seventh to the ninth.
Other midden study finds no clear break from Roman times and no structures at all for this long stretch, so the status of the settlement stays uncertain. A Class I Pictish symbol stone found near the foot of the rock in the nineteenth century may belong to the late Iron Age occupation.
The rock returns to written history around AD 600 in the poem Y Gododdin, which names Din Eidyn, the stronghold of Eidyn. The Gododdin king Mynyddog Mwynfawr and his war band feasted for a year in their fortress and then rode to fight the Angles at Catraeth, possibly Catterick in Yorkshire. The poem says they were killed after deeds of valour. A warrior in the same poem is praised, with the aside that he was not Arthur, and that line is sometimes treated as one of the earliest mentions of Arthur.
In 638 the Irish annals say Etin was besieged by the Angles under Oswald of Northumbria and the Gododdin were defeated. The territory became part of Northumbria. Lothian passed to the Scots in the reign of Indulf, around 954 to 963, when the Pictish Chronicle says the Scots took oppidum Edin from the Angles.
The name of the place is older than any surviving stone castle, and the explanations do not settle it. Andrew of Wyntoun, writing in the late fourteenth or early fifteenth century, has the legendary Ebraucus build Edynburgh. Geoffrey of Monmouth gives Ebraucus fifty children by twenty wives and makes him the founder of York, of Alclud at Dumbarton, and of the Maidens' Castle. John Stow, in the sixteenth century, credits Ebraucus with the Castell of Maidens called Edenbrough in 989 BC.
The Latin Castra or Castellum Puellarum, the Maidens' Castle or Castle of Maidens, appears often until the sixteenth century, including in charters of David I and his successors. William Camden, in 1607, writes that the Britons called it Castle Myned Agned, a winged rock, and that the Scots called it the Maidens' Castle and the Virgins' Castle because young maidens of Pictish royal blood were kept there. Father Richard Hay, in the seventeenth century, says the maidens were nuns who were turned out and replaced by canons thought fitter to live among soldiers. Daniel Wilson later called that story apocryphal, and historians since have set it aside.
The name may come from a legend of nine maidens. Arthurian tradition places a shrine of Morgain la Fee, one of nine sisters, on the site, and St Monenna, said to be one of nine companions, is said to have founded a church at Edinburgh as well as at Dumbarton. Similar names belong to many Iron Age hill forts and may simply mean a place never taken by force, or may descend from an older Brittonic name such as mag dun.
The first documentary reference to a castle, as distinct from a stronghold in poetry, is John of Fordun's account of the death of Malcolm III of Scotland. Fordun, writing in the later fourteenth century, has Malcolm's dates as 1031 to 1093 and places his widow, the future Saint Margaret, in the Castle of Maidens when news of his death arrives in November 1093. She dies of grief within days. Malcolm's brother Donald Bane then besieges the castle.
The near-contemporary life of Margaret by Bishop Turgot does not mention a castle at all. Malcolm III of Scotland, Máel Coluim mac Donnchada, nicknamed Canmore, or ceann mòr, a great chief, was king of Alba from 1058 until his death on 13 November 1093. His long reign of thirty-five years came before the Scoto-Norman age. His kingdom was not modern Scotland.
Islands and the land north of the River Oykel were Scandinavian, and south of the Firth of Forth lay Strathclyde, Bamburgh and other realms whose relationship to his power is uncertain. He led at least five invasions into English territory. His father Duncan I became king in late 1034 on the death of Malcolm II and was killed in Moray on 15 August 1040 by a force under Macbeth. One king-list names Malcolm's mother Suthen.
John of Fordun calls her a blood relative of the Danish earl Siward. A later tradition makes her the daughter of the miller of Forteviot and Malcolm a bastard. Where the boys spent Macbeth's years is debated: England at the court of Edward the Confessor, Orkney with Thorfinn Sigurdsson, Ireland, or Strathclyde. An English invasion in 1054 under Siward aimed to install a Máel Coluim, son of the king of the Cumbrians.
Later writers identified that man with Malcolm III of Scotland. A. A. M.
Duncan argued in 2002 that they had misread the Anglo-Saxon Chronicle, and Richard Oram, Dauvit Broun and Alex Woolf have supported him. The 1054 Máel Coluim may instead have been a son of Owain Foel of Strathclyde. Chroniclers place Macbeth's death at Malcolm's hand on 15 August 1057 at Lumphanan. Macbeth was succeeded by his stepson Lulach.
Malcolm appears in Shakespeare's Macbeth. His second wife was Margaret, an English princess born in exile in Hungary, who reached the Scottish court after the Norman invasion of 1066. They were married in 1069 or in 1070. In November 1093 she was gravely ill at the castle while Malcolm was fighting in Northumbria.
She died soon after hearing that he and their eldest son had been killed. She was known for acts of piety and was made a saint in 1249, also placed in the thirteenth century. During the reigns of Malcolm III of Scotland and his sons the castle became one of the main royal centres. His son Edgar died here in 1107.
Excavation has also been read as finding the road to the back postern by which Margaret's body was taken out in 1093 to be buried at Dunfermline.
David I, the youngest son, reigned from 1124 to 1153 and made Edinburgh a seat of royal power through administrative reform that some scholars call the Davidian Revolution. Between 1139 and 1150 he held an assembly of nobles and churchmen at the castle, a forerunner of parliament. Buildings of his time were probably mostly timber, but two stone churches are on record in the twelfth century. Saint Margaret's Chapel, on the highest point of the rock, is the survivor.
He built it as a private chapel for the royal family and dedicated it to his mother, who had died in the castle in 1093. It is one of the few twelfth-century structures left in any Scottish castle, and it is regarded as the oldest building in Edinburgh. One account places the endowment around 1130. The chapel is broadly rectangular, with a barrel-vaulted nave and an apse divided by a chancel arch of Romanesque detail.
The walls, especially outside, show a complicated building history. It has been suggested that the chapel is the last piece of a square stone keep like the one David began at Carlisle after 1135. The second twelfth-century church was dedicated to Saint Mary and stood where the Scottish National War Memorial stands now. The southern part of the Upper Ward, where Crown Square is now, was not a sound building site until vaults were raised in the fifteenth century, so earlier buildings are thought to have stood toward the north, around the chapel.
The first contemporary record of the castle is a charter of David I from around 1127, later than Fordun's story of 1093.
Malcolm IV, who reigned from 1153 to 1165, is said to have stayed at Edinburgh more than anywhere else. In 1174 William the Lion was captured by the English at Alnwick and signed the Treaty of Falaise. He surrendered Edinburgh Castle, with Berwick, Roxburgh and Stirling, to Henry II. The English held Edinburgh for twelve years.
In 1186 it returned as the dowry of William's bride Ermengarde de Beaumont, chosen for him by Henry. By the end of the twelfth century the castle was the main repository of Scotland's state papers.
The death of Alexander III in 1286 left the throne empty and opened the crisis that became the Wars of Scottish Independence. His heir was his granddaughter Margaret, the Maid of Norway, then three years old. In 1290 the Guardians signed the Treaty of Birgham for her marriage to Edward of Caernarfon, son of Edward I, on the condition that Scotland stayed separate and that its laws and customs were preserved. Margaret died in Orkney around 26 September 1290, soon after landing.
Thirteen rivals remained. The leading claims were those of Robert de Brus, lord of Annandale, grandfather of the later king, and John Balliol, lord of Galloway. The Guardians asked Edward I to judge the cause and avoid civil war. At Norham in 1291 he demanded to be recognised as Lord Paramount.
The claimants, many of them holders of English estates, accepted. On 11 June, acting as Lord Paramount, he ordered every Scottish royal castle into his temporary control and required officials to resign and be reappointed. Homage was to be paid by 27 July 1291. The Great Cause was heard at Berwick.
During the negotiations Edward stayed briefly at Edinburgh Castle and may have received homage there.
In March 1296 Edward invaded, and the first of the Wars of Scottish Independence began. The castle fell after a bombardment of three days. Edward removed legal records and royal treasures to England. In 1300 a garrison of 325 men was installed.
He also sent master builders of his Welsh castles, Thomas de Houghton and Master Walter of Hereford, from Wales to Edinburgh. The first war is dated 1296 to 1328, ending with the Treaty of Edinburgh–Northampton. After Edward I died in 1307, English control weakened. On 14 March 1314 Thomas Randolph, 1st Earl of Moray and nephew of Robert the Bruce, took the castle in a night attack.
John Barbour's poem The Brus tells of thirty picked men guided by William Francis, a man of the garrison who knew a path on the north face and a place where the wall could be climbed. They scaled the rock, surprised the garrison and took the place. Bruce at once ordered the castle slighted so the English could not use it again. Four months later his army won at Bannockburn.
Only Saint Margaret's Chapel seems to have survived that destruction intact. One account of the English return says that in 1335, when they captured the rock again, there were no buildings left except the chapel and a new stable.
Bruce died in 1329. Edward III backed Edward Balliol, son of King John Balliol, against Bruce's son David II. The second war is dated from 1332, with Balliol and the Disinherited, and also from Edward's invasion of 1333. English forces reoccupied and refortified Edinburgh in 1335 and held it until 1341.
William Douglas, Lord of Liddesdale, retook it by disguise. His men posed as merchants from Leith bringing supplies, drove a cart into the entrance and stopped it so the gates could not close. A larger force hidden nearby rushed in. All 100 English men of the garrison were killed.
The digging of the approach has also been read as uncovering the smithy used when Edward III rebuilt the castle during the invasion of 1335. The second war ended with the Treaty of Berwick in 1357. David II, who had spent eleven years as an English hostage, came home and made Edinburgh his principal seat. He began a large rebuilding.
David's Tower, at first called the great tower, was begun around 1367 and was unfinished when he died at the castle in 1371. Robert II completed it in the 1370s, and the wider works are also placed as finished only in Robert II's reign, 1371 to 1390. The tower stood where the Half Moon Battery stands now, linked by a curtain to the smaller Constable's Tower, a round tower of 1375 to 1379 on the site of the later Portcullis Gate. It was an L-plan, among the earliest tower houses of its kind in Scotland, with royal rooms, stores below and a fighting platform above.
The main block measured 51 by 38 feet, or 16 by 12 metres, with a west wing of 21 by 18 feet, or 6.4 by 5.5 metres. Entry was by a pointed arch in the inner angle. In the sixteenth century that opening was filled and the plan became a solid rectangle, a change also placed in the earlier fifteenth century. Before the Lang Siege the tower was recorded as 59 feet, or 18 metres, high, and the parts that remain stand up to 49 feet, or 15 metres, from the rock.
Another account says it was over 30 metres tall and would have dominated the skyline. It is also described as at least three storeys. The Wellhouse Tower at the foot of the rock was built in 1362, or around 1362, to guard Saint Margaret's Well and to serve as a gatehouse. Water was lifted by a crane on the Crane Bastion.
Saint Mary's church on the north side of the later square was rebuilt in 1366.
In the early fifteenth century an English army under Henry IV reached the castle, began a siege and withdrew for lack of supplies. By 1436 or 1437 Sir William Crichton was keeper, or governor, and soon chancellor. Seeking the regency, he moved against the Douglases. In November 1440 the sixteen-year-old William Douglas, 6th Earl of Douglas, and his younger brother David were summoned to the castle.
After the Black Dinner in David's Tower both boys were executed on invented charges in front of the ten-year-old James II, who reigned from 1437 to 1460. Douglas supporters then besieged the castle and damaged it. Crown Square, also called Palace Yard, was laid out over great stone vaults in the 1430s, and the same courtyard is also placed in the reign of James III of Scotland. The vaults levelled the uneven summit.
They were a state prison until the nineteenth century, while more important captives were held in the main buildings. Royal apartments of this time became the core of the later palace, likely on the site of a Great Chamber built for James I in the 1430s. A great hall existed by 1458. In 1464 the present approach up the north-east side of the rock was made so that cannon could be moved into the Upper Ward.
That road is also credited to James III of Scotland.
James III of Scotland was king from 1460 until he was killed at the Battle of Sauchieburn on 11 June 1488. He was the first surviving son of James II and Mary of Guelders. His birth is placed on 10 July 1451, on 20 July 1451, or in May 1452, and either at Stirling Castle or at St Andrews Castle. Norman Macdougall argued for late May 1452 at St Andrews.
The birth fell during the crisis in which James II stabbed William, Earl of Douglas, at Stirling. James II broke Douglas power at Arkinholm in 1455. He was killed at the siege of Roxburgh on 3 August 1460, and the boy king was crowned at Kelso Abbey a week later, two days after Roxburgh fell, because a journey to Scone was not thought possible. His mother Mary of Guelders led the government, and Archibald Whitelaw educated him.
Personal rule began in 1469. His marriage to Margaret of Denmark brought Orkney and Shetland, the greatest territorial extent of the kingdom. He was criticised for schemes against Brittany, Guelders and Saintonge, for debasing the coinage, for hoarding money, for failing to settle feuds, and for an English alliance. Favourites of lower birth alienated bishops, nobles and his own family.
In 1482 his brother Alexander, Duke of Albany, tried to take the throne with an English army, Berwick-upon-Tweed was lost, and nobles imprisoned the king for a time before restoring him. His artistic patronage was real but slight beside that of his son and grandson: painters, musicians, portrait coins, the Trinity Altarpiece and the King's Chapel at Restalrig. He died in a rebellion whose figurehead was his heir, who succeeded as James IV.
At the castle, Alexander Stewart, Duke of Albany, was imprisoned in David's Tower in 1479 for plotting against James III of Scotland. He made his guards drunk, climbed down a rope from a window, fled to France and then to England, and allied with Edward IV. In 1482 he entered Scotland with Richard, Duke of Gloucester, later Richard III, and an English army. James III of Scotland was trapped in the castle from 22 July to 29 September 1482, until he negotiated a settlement.
Through the fifteenth century the castle became an arsenal and a gun factory. The first known purchase of a gun was in 1384. The great bombard Mons Meg was delivered in 1457. She had been made in Flanders in 1449 for Philip III, Duke of Burgundy, and was given to James II, husband of Philip's niece.
She is also described as a six-tonne siege gun that could fire a gunstone of 150 kilograms as far as 3.2 kilometres, or 2 miles, and as a gun of 13,000 pounds, or 5.9 tonnes, whose stones weigh about 330 pounds, or 150 kilograms, each. She is named for the town where she was made. In 1460 James II had her hauled 80 kilometres, or 50 miles, to the siege of Roxburgh. Even oxen could not move her more than 5 kilometres, or 3 miles, in a day.
He was killed there when another of his cannons exploded. James IV used her against Dumbarton and then Norham. She ended her fighting service in the navy of James V and was retired around 1550. An armoury for making guns is first mentioned in 1474.
By 1498 Robert Borthwick was casting bronze guns at Edinburgh. By 1511 Edinburgh had replaced Stirling as the principal foundry, with Scottish and European smiths under Borthwick, who in 1512 was master melter of the king's guns. Their work included guns for the flagship Great Michael and the Seven Sisters, a set captured by the English at Flodden in 1513. Sir Thomas Howard called those cannon the most beautiful for their size and length that he had seen.
From 1510 Dutch craftsmen made hand culverins. After Flodden, Borthwick made more guns, none of which survive. French smiths made hagbuts in the 1550s. By 1541 the castle held a stock of 413 guns.
The royal household was already spending more time at Holyrood Abbey, about a mile, or 1.6 kilometres, from the rock. Around the end of the fifteenth century James IV, who reigned from 1488 to 1513, built the Palace of Holyroodhouse as his main house in Edinburgh, and the castle's life as a home declined. He still built the Great Hall, completed in the early sixteenth century, and the castle was the setting for his tournaments of the Wild Knight and the Black Lady. In 1507 fireworks at a jousting tournament he hosted are called the first fireworks display in Scotland.
His daughter Margaret Stewart was lodged in the castle with her servant Ellen More. The hall that stands on the south side of Crown Square is dated 1509 to 1511 and is also said to have been completed in 1511, while an earlier hall is on record by 1458. Historians have disagreed about the date. It is the smallest of the great halls James IV built, the others being at Falkland and Stirling.
It measures 29 by 12.5 metres, or 95 by 41 feet. Carved stone corbels with Renaissance detail have been compared with work at Blois of about 1515. The hammer-beam roof is largely original and is one of only two late medieval timber roofs surviving in Scotland, the other being at Darnaway. The external walls are mostly of the sixteenth century.
There is no evidence that the Parliament of Scotland ever met in the hall, despite later claims. Hippolyte Blanc restored the interior in 1887 to 1891, and much of what a visitor sees inside dates from that work. The hall had been a barracks from 1650, was split into three storeys in 1737 to house 312 soldiers, and was a military hospital until 1897.
James IV was killed at Flodden on 9 September 1513, fighting forces sent by his brother-in-law Henry VIII. Expecting an English advance, the Scots threw a wall around the town and planned new artillery defences. Robert Borthwick and the Frenchman Antoine d'Arces worked on designs in 1514, but little of that plan seems to have been built. Three years later the five-year-old James V was brought to the castle for safety.
He reigned from 1513 to 1542. When he died, the crown passed to his week-old daughter Mary. Henry VIII tried to force a marriage on Scotland. When the English burned Edinburgh in May 1544, the gunner Andrew Mansioun, firing from the castle, destroyed an English cannon placed against the forework.
In 1547 discontented members of the garrison, resentful of Regent Arran, went to Norham and offered to let the English in. Refortification in the later 1540s included a gunhole of 1546 beside David's Tower, an upper battery behind the curtain, and an angled earthen spur of trace italienne form, one of the earliest in Britain. It was called the forte of the castle hill, or the Spur. Migliorino Ubaldini, also spelled Migiliorino, an Italian engineer from the court of Henry II of France, is said to have overseen it, and the arms of France were said to be carved on it.
Another account places the spur in 1548. Brunstane Castle, home of Alexander Crichton, was pulled down for stone. The spur occupied much of the Castle Hill, with demi-bastions. A similar spur at Stirling is compared with it.
A parliamentary decree of 1649 ordered the spur demolished, razed and levelled. Stone was removed, but excavation has shown that substantial remains survive under the Esplanade. In 2010, when piled foundations were dug for a new grandstand of the Royal Edinburgh Military Tattoo, 326 piles were watched in the hope of finding the spur of 1548, and the buried sixteenth-century artillery spur was traced.
Mary of Guise, widow of James V, was regent from 1554 until she died at the castle in 1560. By the Reformation of that year Holyrood had replaced the castle as the chief royal house. The next year Mary, Queen of Scots, returned from France. In 1565 she married Henry Stuart, also Henry Stewart, Lord Darnley, a match that was unpopular.
On 19 June 1566, in a small room of the palace, she gave birth to their son James, later James VI and, from 1603, king of England as well. The room is called the Birth Chamber or the Mary Room. Its painted ceiling, with thistles, roses, crowned monograms IR and MR, the royal arms and the date 19 June 1566, was added in 1617. That year John Anderson was paid 100 pounds Scots for painting the room where his majesty was born, and that payment is the earliest reference to the small room.
Above the palace door are the gilded initials MAH, for Mary and Henry. The Honours of Scotland, the crown, sceptre and sword of state, were made in Scotland and in Italy in the reigns of James IV and James V. They were first used together at a coronation in 1543, when Mary came to the throne. They are the oldest crown jewels in Britain.
The vaulted Crown Room that now houses them was built in 1615. Mary planned repairs to make the castle fairer. Darnley was murdered at Kirk o' Field in 1567. Three months later she married James Hepburn, 4th Earl of Bothwell, a chief suspect.
Nobles rebelled. She was imprisoned at Lochleven and forced to abdicate. She escaped and fled to England. The castle's captain, James Balfour, handed it to Regent Moray, who ruled in the name of the infant James VI.
After the Battle of Langside in May 1568, Moray made Sir William Kirkcaldy of Grange the keeper.
Grange had been Moray's lieutenant. After Moray was murdered in January 1570 his loyalty weakened. In April 1571 Dumbarton fell to the king's men. Under William Maitland of Lethington, Mary's secretary, Grange changed sides and held the town and castle for Mary against the new regent, the Earl of Lennox.
The standoff lasted until 1573 and is called the Lang Siege, from the Scots word for long. One account begins the siege in June 1571. Another places the first hostilities in May, a month-long siege of the town, and a second short siege in October, with blockade and skirmish between them, while Grange strengthened the castle. The king's party, short of artillery and money and afraid that France and the Duke of Alba might help Grange, asked Elizabeth I for aid.
In July 1572 a truce lifted the blockade. The town went to the king's party and Grange was confined to the castle. The truce ended on 1 January 1573 and Grange bombarded the town. He had 40 cannons but only seven gunners, and powder and shot were low.
The Earl of Morton was now regent. Trenches were dug and Saint Margaret's Well was poisoned. By February every other supporter of Mary had surrendered, but Grange held on despite a shortage of water. The garrison killed townspeople, burned 100 houses and fired on those who tried to put the flames out.
The well of the Upper Ward, and the Fore Well, ran dry, as they had in other sieges. The castle has been called the most besieged place in Britain. Research in 2014 counted 26 sieges in about 1,100 years and called it the most besieged place in Great Britain and one of the most attacked in the world.
In April 1573 about 1,000 English troops under Sir William Drury arrived, followed by 27 cannons from Berwick-upon-Tweed, one of them cast in the castle and taken at Flodden. Batteries were built on Castle Hill facing the east walls and at five other points. One account says they were ready by 17 May and that about 3,000 shots were fired over the next twelve days. Another says the English opened fire on 21 May and that two days of bombardment ended the siege.
On 22 May the south wall of David's Tower collapsed, and on 23 May the Constable's Tower fell. Debris blocked the entrance and the Fore Well. On 26 May the English took the Spur. The next day Grange came out by a ladder and asked for a ceasefire.
Told he would not go free, he meant to fight on, but the garrison threatened to mutiny. He let Drury enter on 28 May, preferring to surrender to the English rather than to Morton. Another account places the end of significant support for Mary at the close of a bombardment that brought down the upper part of David's Tower. The castle was given to George Douglas of Parkhead, Morton's brother, and the garrison was released.
On 3 August Kirkcaldy of Grange, his brother James, and the jewellers James Mossman and James Cokke, who had been minting coins in Mary's name inside the castle, were hanged at the Cross.
Morton rebuilt the Spur, raised the Half Moon Battery and began the Portcullis Gate, with William MacDowall, the master of work who had repaired David's Tower fifteen years earlier, supervising some of the work. The battery was put up between 1573 and 1588 over the ruined tower. Two storeys of the tower survive inside it, with windows looking onto the battery's inner wall. It was rediscovered during maintenance in 1912, cleared of rubble and soil in 1912 to 1913, and several rooms can be visited, though the lower parts are usually closed.
Shattered masonry from the 1573 bombardment is still visible, and a gun loop in a surviving piece of curtain, overlooking the High Street, was opened to view by a recess cut in the outer wall. Historians have called the Half Moon Battery impressive but ineffective and outdated, perhaps because money was short, and also a choice that hid David's Tower and gave the palace block more presence. It is also counted among the best-known rounded artillery bastions. Bronze guns known as the Seven Sisters armed it for 200 years.
The Forewall to the north, linking the Half Moon to the Portcullis Tower, was built between 1689 and 1695 and incorporates part of a wall of 1540. The last modification of these frontal defences is placed in 1695. The Portcullis Gate replaced the round Constable's Tower. William Schaw completed its upper parts in 1584.
They were altered again about 1750. In 1886 to 1887 Hippolyte Blanc replaced the plain upper building with a Scots baronial tower, the Argyle Tower, named because the 9th Earl of Argyll was held there before his execution in 1685. The original gate remains below. The work has been called restoration in an extreme form, and it was the first of a series paid for by the publisher William Nelson.
James VI had repairs done in 1584. The battered palace then lay little used, especially after he left in 1603 to become king of England. He had become king of Scots at thirteen months old. In 1615 to 1617 the mason William Wallace and the master of works James Murray rebuilt the palace for his return, an early Scottish double-pile block.
Three oriel windows of three storeys on the east front face the town and mark the building as a palace. He held court there in 1617 but still preferred to sleep at Holyrood. The work was a statement of kingship and of Stewart ancestry, not the making of a house he meant to live in. The palace is also said to have been begun in the mid-fifteenth century, in the reign of James IV, and to have communicated with David's Tower.
Register House, south of the palace, was built in the 1540s by John Merlioun, also dated 1542, for the state archives. The castle had been a treasury and a mint as well as an archive. Jewels, relics of Robert the Bruce, tapestries and amulets were kept there. In the Second World War the Crown of Scotland was hidden from attack by being buried in a medieval latrine closet inside David's Tower.
In 1621 James granted Sir William Alexander the land between New England and Newfoundland as Nova Scotia. The baronetage of Nova Scotia was created in 1624. Under Scots law a baronet had to take sasine by receiving earth and stone of his land. Because Nova Scotia was far away, the king declared that sasine could be taken there or at the castle of Edinburgh, as the most eminent and principal place of Scotland.
Charles I visited only once. He feasted in the Great Hall and slept in the castle the night before his Scottish coronation in 1633. That was the last time a reigning monarch resided in the castle.
In 1639, after Charles tried to impose episcopacy, the Covenanters under Alexander Leslie took the castle. One account says the capture took thirty minutes. Another calls it a short siege. The Peace of Berwick in June 1639 restored the castle to Charles.
The next year the Covenanters took it again after a siege of three months in which the garrison ran out of supplies. The Spur was badly damaged and was demolished in the 1640s, under the decree of 1649. James Graham, 1st Marquis of Montrose, was imprisoned here after his capture in 1650. In May 1650 the Covenanters signed the Treaty of Breda and allied with the exiled Charles II against the English parliamentarians who had executed his father.
Cromwell invaded, beat the Covenanter army at Dunbar in September, and took the castle after a siege of three months. Colonel Walter Dundas surrendered despite having supplies enough to hold out, allegedly because he wished to change sides. The siege did further damage. A pit in which the castle's dogs were killed and buried has been read as a mid-seventeenth-century event, possibly an epidemic, and possibly the Cromwellian siege of 1650, when dogs might be culled as supposed carriers of disease or simply because they consumed stores.
After the Restoration of 1660, Charles II kept a standing army. From then until 1923 a garrison was continuously maintained, and the royal castle became a garrison fortress. The Marquis of Argyll was imprisoned here in 1661. His son, the 9th Earl, was imprisoned for religious nonconformity under James VII, escaped dressed as his sister's footman, was recaptured after the failed rising of 1685 and was held again before his execution.
James VII was deposed in the Glorious Revolution of 1688. In early 1689 the Estates of Scotland, meeting to accept William of Orange, demanded that the Duke of Gordon, a Catholic governor appointed by James, surrender. He refused. In March about 7,000 troops blockaded a garrison of 160, already split by religion.
On 18 March Viscount Dundee climbed the western rock to urge Gordon to hold the castle, and Gordon agreed. The defence was fierce at times. In April it was reported that Mackay's men and the castle fired fiercely at one another. Later Gordon often refused to fire on the town.
The besiegers did little damage. Gordon surrendered on 14 June because supplies were failing and he had lost 70 men in three months. A hitherto unknown cemetery of the garrison dead from that siege of 1689 was found in the modern excavations.
The castle was nearly taken in the Jacobite rising of 1715. On 8 September, two days after the rising began, about 100 Highlanders under Lord Drummond tried to scale the walls with help from men inside. The rope ladder lowered by the sentries was too short, the alarm was raised at the change of watch, and the attackers fled. Deserters inside were hanged or flogged.
In 1728 General Wade reported the defences decayed and inadequate. Through the 1720s and 1730s Captain John Romer designed, and the architect William Adam built, most of the artillery defences and bastions on the north and west, including the Argyle Battery, Mills Mount Battery, the Low Defences and the Western Defences. The northern and western walls, with their zig-zag lengths and domed sentry boxes, are also associated with Major-General George Wade and with William Adam. The dry ditch in front of the entrance reached its present form in 1742, and is also placed between 1725 and 1742.
After an abortive Jacobite attempt in 1708, the Queen Anne Building was raised in 1708 to 1713 on the west side of Crown Square, on the site of the royal gunhouse and of a late fourteenth- or fifteenth-century range whose southern vaults survive. Captain Theodore Dury designed the barracks and Dury's Battery of 1713 on the south side. The building housed officers and gunners, later a museum, and now a function suite and an education centre. The Governor's House was built in 1742, also dated 1740 to 1742, by Dugal Campbell, for the governor, the storekeeper and the master gunner.
It is two storeys and an attic over a two-storey basement, with a five-bay centre and lower three-bay wings later raised a storey. After the governorship fell vacant it housed nurses of the castle hospital. It is now an officers' mess and the governor's office.
The last military action at the castle came in the Jacobite rising of 1745, the attempt to restore the exiled House of Stuart and the last of a series of risings that began in March 1689. Charles Edward Stuart launched it on 19 August 1745 at Glenfinnan. The Jacobite army, largely Scottish, captured Edinburgh without a fight in September and won at Prestonpans on 21 September. The castle stayed with its ageing deputy governor, General George Preston, who refused to surrender.
The Jacobites tried to blockade it. Preston bombarded their positions in the town. After several buildings had been demolished and four people killed, Charles called off the blockade. The Jacobites had no heavy guns to answer with.
By November they had marched into England, leaving Edinburgh to the garrison. The rising had expected English supporters and a French landing. Neither came. The leaders reached Derby on 4 December and voted to retreat, a decision that split the command.
They won narrowly at Falkirk Muir in January 1746 and were defeated at Culloden in April. Charles escaped to France, failed to gather support for another attempt, and died in Rome in 1788. The background of that rising runs back to 1688, when James II and VII was replaced by his daughter Mary and her husband William. The Act of Settlement of 1701 excluded Catholics, so Anne's heir was the Electress Sophia of Hanover, and Sophia's son became George I in 1714.
Failed risings in 1715 and 1719, and the French need for peace after the death of Louis XIV, had already weakened the cause before Charles landed.
In the aftermath of Culloden, Mills Mount Cart Shed was built in 1746 beside the late seventeenth-century battery and was later an armoury, a magazine and a barracks. Storehouses of 1753 to 1754, or a munitions store of 1747 to 1748, and a powder magazine enclosed Hospital Square. William Skinner, designer of Fort George, levelled the Castle Hill where the Spur had stood and made the parade ground that became the Esplanade. The Esplanade is also dated 1753, with an extension in 1845, and its present form is also placed in 1816 to 1820 as a celebration of Waterloo.
The North Barracks of 1755 replaced a storehouse, shown on Skinner's plan of 1750, which had itself replaced the medieval chapel of Saint Mary, converted to an armoury in 1540 and demolished in 1755. The masonry was reused. Those barracks stood where the Scottish National War Memorial stands. In 1747 the drawing office of the military surveyor William Roy at the castle was the beginning of what became the Ordnance Survey.
For a century the vaults under Crown Square held prisoners of war: in the Seven Years' War of 1756 to 1763, the American War of Independence of 1775 to 1783, and the Napoleonic Wars of 1803 to 1815. The first prisoners are also described as French privateers taken in 1758, soon after the Seven Years' War began, and the vaults are also said to have held many hundreds of prisoners between 1757 and 1814. In 1811, 49 prisoners of war escaped through a hole in the south wall. Another account says that all but one got away, after they hacked through the wall and used ropes down the south crag.
The break persuaded the authorities that the vaults were no longer fit as a prison. That use ended in 1814. Standing-building survey and limited digging from 1998 to 2006, much of it for the Queen Anne Building and for the prisons exhibition, found timber bed structures, showed the vaults used first as barrack rooms, then as a prison of war, then as an ammunition store, and recovered a complicated sequence from the later fourteenth or early fifteenth century up to the barracks of 1708 to 1713. Around 2000, recording of the narrow passage between the Great Hall and the Queen Anne Building logged 37 contexts.
In June 2001 a watching brief under a wooden floor in one upper vault, a floor read as mid-nineteenth century, found a cache of Victorian cartridges of the 1860s: three live Martini-Henry cartridges, nine decayed Schneider-Enfield cartridges, and 33 Wesley-Richards carbine blank cartridges, a cavalry type withdrawn from service in 1866. The west pit-prison became a munition store about 1872 and went out of use about 1911. In 2004 a permanent exhibition opened in the vaults, with two reconstructed prison rooms, a ship model of 1760 of HMS St George, objects made by the prisoners, and three doors carved with graffiti. While restoring the Great Hall in 1887 to 1891, Hippolyte Blanc rebuilt the parapet of the Devil's Elbow and enlarged and glazed the narrow slits of the prison pits.
The castle then slowly became a national monument. In 1818 Walter Scott was allowed to search for the Crown of Scotland, thought lost after the union of 1707. He broke into a sealed room, now the Crown Room, unlocked a chest, and found the Honours. They were shown to the public for one shilling.
In 1822 George IV visited, the first reigning monarch at the castle since Charles II in 1651. In 1829 Mons Meg came back from the Tower of London, where she had been taken when Scotland was disarmed after the rising of 1745. Her barrel had burst on 30 October 1681 while firing a salute for the Duke of Albany, the future James VII and II, on his arrival in Edinburgh. Another account dates the burst to 1681 without the day.
The carriage she sits on was reconstructed from an old stone relief in the gatehouse tunnel, and the present carriage, made in 1935, is based on that carving. Cavalry and infantry escorted her from Leith to the rock in 1829. She stands on the terrace in front of Saint Margaret's Chapel, and she was brought into the vaults for conservation in 1979 and returned to that terrace in 2001. She had been fired in salute for Mary's marriage to the dauphin François.
One account dates that salute to 3 July 1558 and records a payment to soldiers who retrieved a stone from Wardie Muir, fully 2 miles, or 3 kilometres, from the castle. Another dates the firing to 24 September 1558 and says the stone landed in what is now the Royal Botanic Garden, almost 2 miles across the city.
Alexander Nasmyth painted the castle in these years. He was born in Edinburgh on 9 September 1758 and died at 47 York Place on 10 April 1840. He was buried in St Cuthbert's churchyard at the west end of Princes Street. A pupil of Allan Ramsay, he trained in Edinburgh, worked in London on parts of Ramsay's portraits, and returned in 1778.
Patrick Miller of Dalswinton lent him the means to spend two years in Italy from 1782, where he studied landscape and copied a Claude. His portrait of Robert Burns, a friend, is a famous early work. In 1792, after his liberal opinions cost him aristocratic patrons, he abandoned portraiture. His landscapes are of real places, and architecture matters in them.
His canvas Edinburgh Castle and the Nor' Loch, dated 1824 and measuring 45.40 by 61.00 centimetres, shows the Nor' Loch on the ground now occupied by Princes Street Gardens. The loch had already been drained when he painted it, so the picture is a reminiscence. The building of the Royal Institution on the Mound in the 1820s may have prompted him to think of the site as it had been. He also painted a view of Edinburgh from the west in 1822 to 1826.
He was among the painters, with John Slezer, David Octavius Hill, Robert Sanderson and James Norrie the elder, whose images of the castle followed earlier drawings, including an English spy's view of the 1540s and later sixteenth-century pictures of the siege of Leith in 1560 and of the Lang Siege. In October 1788 Nasmyth was one of the crew when Patrick Miller sailed the steamboat designed by William Symington on Dalswinton Loch.
The palace began to be opened to visitors in the 1830s. Saint Margaret's Chapel, used as a gunpowder store from the sixteenth century, when the present roof was built, and by the seventeenth century as a store for artillery supplies, was rediscovered in 1845 by the antiquary Daniel Wilson, while it formed part of a larger garrison chapel. It was restored in 1851 to 1852, also described as a restoration of the 1850s and again of the 1880s. It is still used for worship, weddings and christenings.
In 1855, while in Germany, Richard Clement Moody of the Royal Engineers drew up restoration plans measured to musical chords. Lord Panmure was impressed and had him present them at Windsor to Victoria and Albert. Panmure's retirement stopped the building of those plans. They were kept at the War Office.
Several schemes of the nineteenth century proposed rebuilding the whole castle as a Scottish baronial château. Work began in 1858 and was soon abandoned. Only the hospital was remodelled in that manner, in 1897. After Prince Albert died in 1861, David Bryce proposed a keep 50 metres, or 160 feet, high as a memorial.
Victoria objected, and the scheme was dropped. In the 1880s William Nelson's money and Blanc's designs produced the Argyle Tower and the restored hall. A new gatehouse, an architectural screen rather than a medieval defence, was built in 1888, also dated 1886 to 1888, with later work by Robert Lorimer. Statues of Robert the Bruce by Thomas Clapperton and of William Wallace by Alexander Carrick were added in 1929, for the six-hundredth anniversary of Bruce's death.
The Latin motto Nemo me impune lacessit is cut above the gate. The ticket office north of the gatehouse, by Gareth Hoskins Architects, was completed in 2008. In 1990 a vehicle tunnel was dug from the north of the Esplanade to the north-west of the castle so that visitors and service traffic could be separated. That tunnel was the occasion of the Bronze Age and Iron Age dig.
Alexander Carrick, born on 20 February 1882 in Musselburgh, the son of a blacksmith, and died on 26 January 1966, was a leading monumental sculptor of the early twentieth century. He entered Edinburgh College of Art in 1897, was apprenticed to Birnie Rhind, won the Queen's Prize, studied under Édouard Lantéri at South Kensington, and then worked under Pittendrigh MacGillivray. He married Janet Ferguson MacGregor in 1914. In 1916 he joined the Royal Garrison Artillery and served in Belgium, where a shell burst prematurely in his battery and left him badly shocked.
He modelled The Gunner that year. He was elected an Associate of the Royal Scottish Academy in 1918, while still in Belgium. After the war he carved many memorials in freestone, especially Doddington stone, and some figures in bronze. At the castle, Robert Stodart Lorimer commissioned him in 1927 for the Scottish National War Memorial.
On the south elevation, Justice and Courage stand on the wings at either end of the south façade on Crown Square. Inside, in the east bay, his bronze panels commemorate the Royal Artillery and the Royal Engineers. Other sculpture on the memorial is by Pilkington Jackson, John Marshall and Phyllis Bone, also spelled Phillis Bone, who carved the lion and unicorn by the door. A relief of the Calling of Saint Andrew by Alice Meredith Williams stands high on the shrine.
A figure of the survival of the spirit, by Percy Portsmouth, occupies the niche above the doorway. The stained glass is by Douglas Strachan.
The Scottish National War Memorial occupies the converted North Barrack Block on the north side of Crown Square. Proposals were made in 1917 by John Stewart-Murray, 8th Duke of Atholl, and Captain George Swinton of Kimmerghame. Sir Robert Lorimer, architect of the Thistle Chapel and a designer for the war graves of the empire, was appointed in 1919. The Cockburn Association and others who cared for the castle's fabric opposed a large new monument.
A more modest remodelling of the barrack block was agreed in 1923. Lorimer kept the shell, added a porched entrance and a five-sided apse for the shrine, and built the memorial in 1924 to 1927. The Prince of Wales, later Edward VIII, opened it on 14 July 1927. It remembers Scottish service personnel and civilians, and those who served with Scottish regiments, who died in the two world wars and in later conflicts.
The rolls include Scots killed by enemy action or dead of wounds, disease or injury in the British armed forces, the merchant navy, the forces of the dominions, the women's services and the nursing services, together with all members of Scottish regiments. People who did not serve in a Scottish regiment must have been born in Scotland or have had at least one parent born there. The First World War roll covers deaths from 4 August 1914 to 31 August 1921. An earlier limit ran to the Treaty of Versailles on 28 June 1919, and confirmed military suicides and those tried and executed were excepted.
The Second World War roll covers 3 September 1939 to 31 December 1947. One count gives close to 135,000 names for the first war and over 50,000 for the second. The sealed casket on the altar, set on the highest part of the rock where it comes through the floor, is said to hold over 147,000 names of soldiers killed in the First World War, with open lists in the hall. After the second war another 50,000 names were added in the hall.
Later names include the Malayan Emergency, the Korean War of 1950 to 1953, Operation Banner from 1969 to 2007, the Falklands War of 1982, the Gulf War of 1990 to 1991, and the wars in Iraq and Afghanistan. The memorial building itself has been left unchanged while names continue to be added. A charitable trust maintains it. Thirty-one kilowatt solar panels were later set on its roof, hidden by the parapet.
In 1905 responsibility passed from the War Office to the Office of Works, though the garrison stayed until 1923, when the troops moved to Redford Barracks in the south-west of the city. The castle was a prison again in the First World War, when the Red Clydesider David Kirkwood was held in the military prison, and in the Second World War, when German airmen shot down over the Firth of Forth were brought up and treated in the military hospital. The military prison itself was built in 1842, also dated 1840 to 1842, as a detention block for the garrison, with two tiers of solitary cells in an original eastern block, and was extended in the 1880s, also dated 1880, with a new top floor for the provost-marshal. It was last used in 1923.
Recent research has been funded into that prison and the people associated with it, and a survey of military-era graffiti across the castle is planned. The governorship, vacant since 1876, was revived in 1935 as an honorary title for the general officer commanding in Scotland. The first holder was Lieutenant-General Sir Archibald Cameron of Lochiel. Another account places the restoration of the post in 1936.
The castle passed into the care of Historic Scotland when that body was established in 1991. It was designated a scheduled ancient monument in 1993, the designation being added on 17 May 1993, amended on 15 November 2019, with supplementary information updated on 5 February 2020. Twenty-four separate listings protect buildings and structures, thirteen of them in category A. The Scottish Ministers own the castle.
It is run for the most part as a visitor attraction, while the army remains responsible for the New Barracks, the Guardroom is shared, and armed sentries watch the gatehouse outside opening hours. The garrison guards the Honours. The New Barracks, completed in 1799 and also dated 1796 to 1799, were built to house 600 soldiers and to replace the outdated rooms in the Great Hall. They are also described as a product of the Napoleonic Wars.
From the east the block reads as three storeys and an attic. From the west it is a monumental six storeys, with a cast-iron verandah added in 1893. They still house soldiers, and they hold the headquarters of the Royal Regiment of Scotland and of the Royal Scots Dragoon Guards. The Dragoon Guards Museum was opened in 1995 by the regiment's colonel, Queen Elizabeth II.
The Royal Scots Museum occupies the former drill hall of 1900. The National War Museum of Scotland, part of the National Museums of Scotland, is in the former hospital west of the Governor's House, remodelled from storehouses in 1897. It was earlier the Scottish United Services Museum and, before that, the Scottish Naval and Military Museum in the Queen Anne Building. It covers about 400 years of Scottish military history.
The governor is now a ceremonial post held in the Army Reserve. Bob Bruce (British Army officer), Major General Robert Bernard Bruce, has been Governor of Edinburgh Castle since September 2024, when he succeeded Major General Alastair Bruce of Crionaich. He was commissioned into the Royal Scots on 5 September 1986, commanded the Royal Scots from February 2006, and then commanded The Royal Scots Borderers, 1st Battalion, The Royal Regiment of Scotland, after the Royal Scots and the King's Own Scottish Borderers merged that year. He commanded 4th Mechanised Brigade in 2011 and Task Force Helmand from October 2012 until his return in April 2013, when he became Director Combat.
He was deputy commander of a multinational task force in the Middle East from December 2014, Director Capability from November 2015, and Military Secretary and General Officer, Scotland, from July 2017. He retired from the regular army on 26 February 2020. He was Colonel of the Royal Regiment of Scotland from July 2016 until Nick Borton succeeded him on 1 November 2019.
The Stone of Scone, also called the Stone of Destiny, on which Scottish monarchs were traditionally crowned, has been kept in the Crown Room with the Honours since its return to Scotland in 1996. The One O'Clock Gun is a time signal fired every day at one in the afternoon except Sunday, Good Friday and Christmas Day. It was established in 1861 for ships in the harbour of Leith and the Firth of Forth, about 2 miles, or 3 kilometres, away, because the time ball set on the Nelson Monument in 1852 could not be seen in fog. A map of 1861 showed when the sound, travelling at about 343 metres a second, would arrive in different parts of the city.
The first gun was an 18-pound muzzle-loader, needing four men, fired from the Half Moon Battery. A 32-pound breech-loader replaced it in 1913, a 25-pound howitzer in May 1952, and the present L118 light gun on 30 November 2001. On Sunday 2 April 1916 the gun was fired, at an unknown hour, at a German Zeppelin, its only known use in war. It is now fired from Mills Mount by the District Gunner of 105th Regiment Royal Artillery.
Staff Sergeant Thomas McKay, Tam the Gun, fired it from 1979 until January 2005. In 2006 Sergeant Jamie Shannon became the twenty-ninth District Gunner, and Bombardier Allison Jones became the first woman to fire it. A watching brief in April and May 2005, also noted as running from 18 to 24 January 2005, during the relaying of flagstones at Mills Mount, found the foundation of an older gun platform, later reduced, and the crown of the tunnel vault, which cuts the east side of that platform and so is later than it.
The Royal Edinburgh Military Tattoo, the Edinburgh Military Tattoo until the royal title of 2010, has been held on the Esplanade each August since 1950. It is built on a parade of massed pipes and drums and has grown to include performers invited from many countries. The evening ends with a lone piper on the battlements and then massed bands. The audience is about 217,000 a year, and broadcasts in some 30 countries have been estimated to reach 100 million viewers.
The castle is a backdrop of the Edinburgh Festival and a focus of fireworks at Hogmanay and at the end of the Festival. It appears on the arms of the City of Edinburgh Council and of the University of Edinburgh, on the badge of No. 603 Squadron, on stamps and on banknotes, including a five-pound note of the 1960s, one-pound notes of the Royal Bank of Scotland since 1987, and ten-pound notes of the Clydesdale Bank since 2009.
The castle is not a world-heritage inscription of its own. It is part of the Old and New Towns of Edinburgh, inscribed in 1995 and described as dominated by a medieval fortress. The Old Town runs from the castle on its rock down the ridge to Holyrood. The inscribed property covers 443 hectares.
Edinburgh has been the Scottish capital since the fifteenth century. In 2025 the castle received 2,044,963 visitors. It is described both as Scotland's second most visited tourist attraction, with over 70 percent of leisure visitors to Edinburgh coming to it, and as the most popular paid attraction in Scotland.
Small excavations have continued to test how much of the early castle survives. In January and February 2024, over four days that were not consecutive, three hand-dug trenches were opened for a lightning-protection system, two in the gatehouse exercise yard and one at the Half Moon Battery. Each trench was 0.65 metres by 0.65 metres and 0.50 metres deep. The gatehouse trenches found the foot of the standing wall and the fills of later building work.
A single fine grey stoneware sherd, possibly of Siegburg type, came from the first of those trenches. The Half Moon Battery trench found paving setts on concrete and levelling deposits, and no significant archaeological material. The rock, from Bronze Age pits to a garrison that still mounts a ceremonial guard, has been occupied, rebuilt and besieged without a long abandonment, which is why even a small trench is still watched.
Sources
- Edinburgh Castle — Wikipedia
- Malcolm III of Scotland — Wikipedia
- James III of Scotland — Wikipedia
- Wars of Scottish Independence — Wikipedia
- Jacobite rising of 1745 — Wikipedia
- Scottish National War Memorial — Wikipedia
- Bob Bruce (British Army officer) — Wikipedia
- Alexander Carrick — Wikipedia
- Alexander Nasmyth — Wikipedia
- History of the castle — Edinburgh Castle
- The Characters — Edinburgh Castle
- Mons Meg — Edinburgh Castle
- Opening times — Edinburgh Castle
- Tickets — Edinburgh Castle
- Plan your visit — Historic Environment Scotland
- Edinburgh Castle/Caisteal Dhùn Èideann — Historic Environment Scotland
- Old and New Towns of Edinburgh — UNESCO World Heritage Centre
- Archaeology at Edinburgh Castle — Dig It!
- Edinburgh Castle and the Nor' Loch — National Galleries of Scotland
- The Scottish National War Memorial: figures of Justice and Courage — Mapping Sculpture
- Edinburgh Castle, Lightning Protection Systems Installation: Archaeological Watching Brief — AOC Archaeology
- Edinburgh Castle from the Grassmarket.jpg — Wikimedia Commons
- 2005-10-18 - United Kingdom - Scotland - Edinburgh - Edinburgh Castle - Post Box - Web 4887742575.jpg — Wikimedia Commons
- CMSJ IMG 35992 (3869655709).jpg — Wikimedia Commons
- CMSJ IMG 35732 (3869653465).jpg — Wikimedia Commons
- 2005-10-18 - Edinburgh - Edinburgh Castle - Web (4888344528).jpg — Wikimedia Commons
- Christmas at The Great Hall (15539296363).jpg — Wikimedia Commons
- Amazing Grace Gold Record (15973263447).jpg — Wikimedia Commons
- Colours at Edinburgh Castle (16156868721).jpg — Wikimedia Commons
- 19960605 49 Edinburgh Castle (5492830905).jpg — Wikimedia Commons
- -Officer of the 92nd Gordon Highlanders Reading to the Troops, Edinburgh Castle- MET DT4215.jpg — Wikimedia Commons