Clan Rising
Edinburgh Castle today

Scotland · Restored

Edinburgh Castle

Caisteal Dhùn Èideann

Edinburgh Castle is a historic fortress occupying Castle Rock, a volcanic plug overlooking the city of Edinburgh. The site contains a cluster of medieval and early modern stone buildings including St Margaret's Chapel, the Royal Palace and the Great Hall, set within curtain walls and defensive terraces on a steep crag.

Photograph via Wikimedia Commons

First raised

1200

Its prime

1520

Today

Restored

As it stood in 1520

What Edinburgh Castle looked like in its prime.

Perched on a steep dolerite crag, the castle reads as a compact cluster of grey-brown stone buildings and high curtain walls. A long, narrow ridge approach from the east leads to a gatehouse and Crown Square; above sits a rectangular palace block with regular rows of mullioned windows and pitched roofs with chimneys. Rounded artillery towers and crenellated battlements punctuate the curtain, and a small stone chapel occupies the summit. At its prime the roofs, windows and battlements are complete and intact.

Its story

The story of Edinburgh Castle.

Alauna and the Maidens' Castle: the Rock before the Castle

Ptolemy's second-century map puts a settlement called Alauna — "rock place" — in the territory of the Votadini, possibly the earliest name the Castle Rock carries, though it may belong to another of the tribe's hill forts nearby. Excavation in the early 1990s found the site had been settled in the late Bronze Age or early Iron Age, which would make it potentially the longest continuously occupied place in Scotland, but the finds were too slight to say much about the scale of it. The Iron Age evidence is firmer: the dig pointed to a probable enclosed hillfort, with house fragments like the Iron Age dwellings found in Northumbria, and clear signs of habitation in the first and second centuries AD. Roman pottery, bronzes and brooches came up with them, implying trade between the Votadini and the Romans from Agricola's northern campaign of AD 82 through to the building of the Antonine Wall around AD 140; Driscoll and Yeoman have suggested the settlement of that period may have been a broch.

The rock was long known as the Maidens' Castle — Castra Puellarum — a name that recurs until the sixteenth century and appears in the charters of David I and his successors, for reasons nobody has established. William Camden's Britannia of 1607 reports that "the Britans called [it] Castle Myned Agned [winged rock], the Scots, the Maidens Castle and the Virgins Castle, of certaine young maidens of the Picts roiall bloud who were kept there in old time". The seventeenth-century antiquarian Father Richard Hay held that the maidens were nuns, ejected from the rock and replaced with canons reckoned "fitter to live among soldiers" — a story the nineteenth-century antiquarian Daniel Wilson called apocryphal and historians have passed over since.

From Din Eidyn to the Night Climb of 1314

After Ptolemy's 2nd-century map, the rock vanishes from the record until around AD 600, when the Welsh epic Y Gododdin names Din Eidyn, "the stronghold of Eidyn" — generally taken to be this rock — as the fortress where King Mynyddog Mwynfawr feasted his warriors for a year before they rode south to be massacred at Catreath. The Irish annals give the sequel: in 638 the Angles under Oswald of Northumbria besieged "Etin" and the Gododdin were defeated. The first documentary reference to a castle here is John of Fordun's, placing Queen Margaret at the "Castle of Maidens" in November 1093 when news came of Malcolm III's death, with Malcolm's brother Donald Bane laying siege to it — though Fordun wrote three centuries later, and Bishop Turgot's near-contemporary life of Margaret mentions no castle at all. From the reign of David I survives St Margaret's Chapel, regarded as Edinburgh's oldest building. In 1174 William "the Lion", captured at Alnwick, signed the Treaty of Falaise and surrendered Edinburgh along with Berwick, Roxburgh and Stirling; the English held it twelve years, returning it in 1186 as the dowry of his English bride, Ermengarde de Beaumont.

Edward I invaded in March 1296 and the castle surrendered after a three-day bombardment. He shipped Scottish legal records and royal treasures south, installed a garrison of 325 men by 1300, and brought in Thomas de Houghton and Master Walter of Hereford, the master builders of his Welsh castles. On 14 March 1314 Thomas Randolph, 1st Earl of Moray, retook it by night: Barbour's poem The Brus tells how thirty hand-picked men were guided by William Francis, a member of the garrison who knew a route up the north face of the rock and a place where the wall could be scaled. Robert the Bruce ordered the castle slighted at once to prevent its re-occupation; four months later his army won at Bannockburn. The English refortified it in 1335 and held on until 1341, when William Douglas, Lord of Liddesdale, disguised his men as merchants from Leith and halted a cart in the entrance so the gates could not close. All 100 men of the English garrison were killed.

David's Tower and the King's Gun Foundry

After the 1357 Treaty of Berwick, David II made the castle his principal seat of government and began David's Tower around 1367; it was unfinished when he died here in 1371. An English siege under Henry IV in the early 15th century withdrew for want of supplies. In November 1440 Sir William Crichton summoned the 16-year-old Earl of Douglas and his brother David to the "Black Dinner" in David's Tower, where both were executed before the 10-year-old James II; Douglas' supporters besieged the castle afterwards and did it damage.

The castle was meanwhile becoming Scotland's arsenal. The first known gun purchase came in 1384, the great bombard Mons Meg was delivered in 1457, and by 1498 master gunner Robert Borthwick was casting bronze guns here. By 1511 Edinburgh had supplanted Stirling as the principal foundry in Scotland, casting the "Seven Sisters", the cannons the English took at Flodden in 1513 and which Lord Admiral Sir Thomas Howard thought the finest guns of their size he had ever seen.

Flodden's Aftermath and the Spur, 1513–1566

James IV was killed at Flodden on 9 September 1513, and the Scots, expecting the English to press the advantage, threw a town wall around Edinburgh and strengthened the castle. Robert Borthwick and a Frenchman, Antoine d'Arces, worked on new artillery defences in 1514, though little of what they planned appears to have been built. Three years later the five-year-old James V was brought here for safety, and when he died the crown passed to a week-old daughter — after which Henry VIII's attempt to force a dynastic marriage on Scotland brought invasion. When the English burnt Edinburgh in May 1544 the gunner Andrew Mansioun, firing from the castle, destroyed an English cannon set to bombard the forework. In 1547 members of the garrison who resented the Regent Arran went to Norham Castle and offered to let the English in.

The refortification of 1548 raised the Spur, an earthen angle-bastion of the trace italienne type and one of the earliest in Britain, built with stone taken from Brunstane Castle, home of the traitor Alexander Crichton. It may have been designed by Migliorino Ubaldini, an Italian engineer from the court of Henry II of France, and was said to carry the arms of France carved on it. Mary of Guise governed as regent from 1554 until she died in the castle in 1560, and on 19 June 1566 her granddaughter's son — James, who would rule both kingdoms — was born in a small room of the palace on the rock.

The Lang Siege, 1571–1573

Sir William Kirkcaldy of Grange was made Keeper of the Castle in May 1568, but after the Regent Moray's murder in January 1570, and under the influence of Mary's secretary William Maitland of Lethington, he changed sides and held the rock for the exiled Mary, Queen of Scots. A truce brokered by Elizabeth I's ambassadors in July 1572 expired on 1 January 1573, and Grange began bombarding the town. His position was desperate: forty cannons but only seven gunners, powder and shot running low, and a water supply that failed even from the castle's 34-metre well. The besiegers dug trenches around the rock and poisoned St Margaret's Well; the garrison answered with sorties that burnt 100 houses, then fired on anyone trying to douse the flames.

In April around 1,000 English troops under Sir William Drury arrived, followed by 27 cannons from Berwick-upon-Tweed — one of them cast inside this castle and taken by the English at Flodden. Six batteries were ready by 17 May, and over twelve days they put some 3,000 shots into the rock. The south wall of David's Tower collapsed on 22 May and the Constable's Tower the next day, the debris blocking the entrance and the Fore Well, which had already run dry. The English stormed the Spur on 26 May; on the 28th Grange, refused free passage and facing mutiny in his own garrison, surrendered to Drury rather than to the Regent Morton. His men went free. 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 in Edinburgh on 3 August.

Morton rebuilt what the guns had brought down — the Spur, the Portcullis Gate, and the Half Moon Battery raised between 1573 and 1588 over the stump of David's Tower, a great bulk of masonry that was already outdated as artillery defence when it went up. Almost nothing here pre-dates the siege beyond St Margaret's Chapel, the Royal Palace and the early 16th-century Great Hall.

Nova Scotia Sasine, the Covenanters and Cromwell

The battered palace block stood unused, the more so after James VI left in 1603 to become King of England, until the mason William Wallace and master of works James Murray remodelled it in 1615–16 ahead of his return; James held court there in 1617 but still slept at Holyrood. In 1621 he granted Sir William Alexander the land between New England and Newfoundland as Nova Scotia, and when its baronetage followed in 1624 a difficulty arose, since a baronet had in Scots law to take sasine by receiving earth and stone of his land. The King ruled that sasine could be taken in the new province or else "at the castle of Edinburgh as the most eminent and principal place of Scotland".

Charles I came only once, feasting in the Great Hall and sleeping here the night before his Scottish coronation in 1633 — the last occasion a reigning monarch resided in the castle. Civil war followed in 1639 over his attempt to impose Episcopacy on the Scottish Church: the Covenanters under Alexander Leslie took the castle after a short siege, and it was handed back under the Peace of Berwick that June. The next year they took it again after a three-month siege that starved the garrison out; the Spur was badly damaged and demolished in the 1640s. The Marquis of Montrose was imprisoned here after his capture in 1650. That May the Covenanters allied with the exiled Charles II by the Treaty of Breda; Cromwell invaded, broke their army at Dunbar in September, and took the castle after a three-month siege, Governor Colonel Walter Dundas surrendering while he still had supplies to hold out, allegedly wishing to change sides.

The Duke of Gordon's Three Months and the Jacobite Ladders

After the Restoration of 1660 Charles II kept a standing army modelled on Cromwell's New Model Army, and from that year until 1923 a garrison was maintained here without a break. The Marquis of Argyll was imprisoned in 1661, and twenty years later his son the 9th Earl escaped dressed as his sister's footman, only to be brought back after his failed rebellion of 1685. When the Estates of Scotland demanded in early 1689 that the Duke of Gordon give up the castle to William of Orange, the Catholic governor refused. From March, 7,000 troops blockaded a garrison of 160 divided by religious quarrels; on 18 March Viscount Dundee climbed the western side of the rock to urge Gordon to hold out, and he agreed. An April report has "Mackay's men, and the Castle, fire fiercely one at the other", though Gordon later refused to fire on the town. The besiegers did little damage, but he surrendered on 14 June, short of supplies and 70 men down.

In the rising of 1715, two days after it began, about 100 Jacobite Highlanders under Lord Drummond tried to scale the walls with help from inside; the rope ladder the sentries lowered was too short, the alarm went up at the change of watch, and the deserters within were hanged or flogged. General Wade reported the defences decayed and inadequate in 1728, and through the 1720s and 1730s the artillery works on the north and west — the Argyle and Mills Mount batteries, the Low and Western Defences — were built to Captain John Romer's designs by the architect William Adam. The last military action came in 1745: Charles Edward Stuart took Edinburgh without a fight that September, but the ageing Deputy Governor, General George Preston, would not surrender, and when the Jacobites blockaded the rock after Prestonpans he bombarded their positions in the town until, several buildings demolished and four people killed, Charles called the blockade off.

Prisoners of War, Scott's Honours and the Long Restoration

For the next century the vaults held prisoners of war — through the Seven Years' War, the American War of Independence and the Napoleonic Wars — while powder magazines, the Governor's House of 1742 and the New Barracks of 1796–99 went up around them. In 1811, 49 prisoners escaped through a hole in the south wall, and the castle stopped taking prisoners of war in 1814. In 1818 Sir Walter Scott was allowed to hunt for the Crown of Scotland, thought lost since the union of 1707; he broke into a sealed room, opened a chest, and found the Honours of Scotland, put on show for an entry charge of one shilling. George IV's visit in 1822 was the first by a reigning monarch since Charles II in 1651, and Mons Meg came back from the Tower of London in 1829, having been removed in the disarming of Scotland after the '45.

St Margaret's Chapel, long used as a store, was "rediscovered" in 1845. Money from the publisher William Nelson paid for the works of the 1880s, carried out by Hippolyte Blanc, which raised the Argyle Tower over the Portcullis Gate and restored the Great Hall after years as a barracks. The troops left for Redford Barracks in 1923, though the castle held prisoners again in both world wars — the "Red Clydesider" David Kirkwood, and later downed Luftwaffe pilots. Sir Robert Lorimer's Scottish National War Memorial, opened on 14 July 1927, holds a sealed casket listing over 147,000 Scottish dead of the First World War. Research in 2014 counted 26 sieges across 1,100 years, a claim to being "the most besieged place in Great Britain". Scheduled as an ancient monument in 1993, the castle is cared for by Historic Environment Scotland, and the Army's remaining presence is largely ceremonial: it is regimental headquarters of the Royal Regiment of Scotland and the Royal Scots Dragoon Guards.

Direct administration by the War Office ended in 1905, and the castle now belongs to the Scottish Ministers. The One O'Clock Gun has been fired from the rock since 1861, set up as a time signal for shipping in Leith and the Firth of Forth two miles off, complementing the Time Ball raised on the Nelson Monument in 1852 and useless in fog; a map was published the same year showing when the report would reach each part of the city, sound travelling as slowly as it does. The first gun was an 18-pounder muzzle-loader that took four men to load, fired from the Half Moon Battery; a 32-pound breech-loader replaced it in 1913, a 25-pound howitzer in May 1952 and an L118 Light Gun on 30 November 2001. Its only known use in war came on Sunday 2 April 1916, when it was fired in vain at a German Zeppelin during an air raid. Bombardier Allison Jones became the first woman to fire it in 2006.

The Edinburgh Military Tattoo has been staged on the Esplanade every August since 1950, built around the massed pipes and drums of the Scottish regiments and closing with a lone piper on the battlements playing a pibroch for the dead; it draws an audience of about 217,000 and is broadcast in some thirty countries. The castle remains the most popular paid visitor attraction in Scotland, with 2,044,963 people through the gate in 2025.

Step inside

8 places to explore in 1520.

The record describes 8 distinct spots at Edinburgh Castle, including 3 interiors: great hall (interior), st margaret's chapel, deep well shaft (upper ward supply). Create your own photoreal reconstruction and explore every one, more scenes means more rooms, more angles, and more of the place to stand in.

Eastern ridge approachCrown Square / Upper WardRoyal Palace (exterior)Great Hall (interior)St Margaret's ChapelBattlements and curtain wallsDeep well shaft (Upper Ward supply)Base of the Castle Rock

Build Your Own Castle

Recreate Edinburgh Castle with AI to explore it.

The artist rebuilds it as it stood in 1520, a photoreal reconstruction that belongs to you alone. Pay with coins, no subscription needed.

Recreate this castle →

Castle Siege

Play Castle Siege at Edinburgh Castle.

A strategy game played on Edinburgh Castle’s real ground plan: the same surveyed walls shown in the archive below. Post your finite garrison on the battlements between assaults, then hold out as rams, siege towers, trebuchets and sappers arrive in ever-worse waves.

Sign in free to see the garrison muster. One castle costs 150 Clan Coins and is yours forever.

Sign in to take command →

See every castle’s leaderboard →

From the archive

Edinburgh Castle on paper: the measured plan and period views.

The survey plan and photographs below are the ground truth this page's reconstructions are checked against, drawn and photographed while the castle was still a working garrison. Every image is public-domain or openly licensed, with its source named.

Edinburgh from the castle, Scotland, 1890s, Edinburgh Castle

Edinburgh from the castle, Scotland, 1890s

ca. 1890-1900 · Photochrom Prints Collection (via Wikimedia Commons)

Public domain

Fig. 388. — Edinburgh Castle. General Plan (from the Ordnance Survey)., Edinburgh Castle

Fig. 388. — Edinburgh Castle. General Plan (from the Ordnance Survey).

1887 · MacGibbon & Ross, Castellated and Domestic Architecture of Scotland, vol. 1 (1887)

Public domain

Fig. 390. — Edinburgh Castle. Restoration by Dr. Robert Chambers., Edinburgh Castle

Fig. 390. — Edinburgh Castle. Restoration by Dr. Robert Chambers.

1887 · MacGibbon & Ross, Castellated and Domestic Architecture of Scotland, vol. 1 (1887)

Public domain

Questions about Edinburgh Castle

What is the history of Edinburgh Castle?

Edinburgh Castle began as a royal castle on Castle Rock in the 11th century and became one of Scotland’s major strongholds. It remained a royal residence until 1633, after which its role was chiefly military. Its history includes the Wars of Scottish Independence, the Lang Siege of 1573 and the Jacobite rising of 1745; research has counted 26 sieges in its 1,100-year history.

What is inside Edinburgh Castle?

Inside Edinburgh Castle are spaces including St Margaret's Chapel, the Great Hall, the Royal Palace and the deep well shaft serving the Upper Ward. St Margaret's Chapel dates from the early 12th century and is regarded as Edinburgh’s oldest building. The castle also houses the Honours of Scotland, the Scottish regalia, along with the Scottish National War Memorial, the National War Museum and regimental museums.

Who owns Edinburgh Castle now?

Edinburgh Castle is owned by the Scottish Government and Historic Environment Scotland, and it is operated by Historic Environment Scotland. It is also a scheduled monument, with that designation recorded since 1993. The current running of the site sits with Historic Environment Scotland rather than a private household.

Why was Edinburgh Castle built and what was it used for?

Edinburgh Castle was built to serve as a royal stronghold on Castle Rock, guarding Edinburgh from a naturally defensive volcanic crag. It served at different times as a royal residence, arsenal, treasury, national archive, mint, prison, military fortress and home of the Honours of Scotland. From the 17th century it was principally a military garrison, after its residential role had declined.

Does anyone live in Edinburgh Castle now?

Edinburgh Castle is not presented as a lived-in home today; its current use is as a heritage site, museum complex and ceremonial military place. It was a royal residence until 1633, but by the 17th century it was chiefly a military garrison. The British Army remains responsible for some parts, with a largely ceremonial and administrative presence.

Where is Edinburgh Castle?

Edinburgh Castle is in Edinburgh, Scotland, on Castle Rock above the city. The rock is an extinct volcanic plug with cliffs on the south, west and north, leaving the eastern ridge as the main approach. Administratively, it is in the City of Edinburgh.

When was Edinburgh Castle built?

Edinburgh Castle was built in medieval phases rather than in one single campaign. A royal castle existed on Castle Rock by the 11th century, while St Margaret’s Chapel is from the early 12th century and the Great Hall is early 16th-century. The site’s later palace, halls, walls and batteries reflect repeated rebuilding after war and siege.

Was Edinburgh Castle ever attacked or besieged?

Edinburgh Castle was attacked and besieged many times, with 26 sieges identified in its 1,100-year history. In 1296 it surrendered to Edward I after a three-day bombardment, and in 1314 Thomas Randolph recaptured it by a night assault. It was retaken again in 1341 by William Douglas, and the Lang Siege of 1573 destroyed much of the medieval defence by artillery bombardment.

What did Edinburgh Castle look like in its prime?

In its prime, Edinburgh Castle looked like a tight mass of grey-brown stone buildings and high curtain walls on a steep dolerite crag. The eastern ridge led to the gatehouse and Crown Square, with the Royal Palace above it. Mullioned windows, pitched roofs, chimneys, rounded artillery towers, crenellated battlements and St Margaret’s Chapel gave the summit its compact fortified outline.

Is Edinburgh Castle still standing or is it a ruin?

Edinburgh Castle is still standing and is restored, not a ruin. Few present buildings pre-date the Lang Siege of 1573, when artillery bombardment destroyed much of the medieval defence. The main exceptions are St Margaret’s Chapel, the Royal Palace and the early 16th-century Great Hall, while restoration programmes have been carried out over the past century and a half.

Can you visit Edinburgh Castle?

Edinburgh Castle can be visited as a major public heritage attraction and museum site. It is in the care of Historic Environment Scotland and is described as Scotland’s second most visited tourist attraction. The castle also contains the National War Museum, the Scottish National War Memorial and several regimental museums.

Explore the city

Edinburgh Castle stands in historic Edinburgh, explore the whole city through the ages

Explore historic Edinburgh through the ages · All castles of Scotland · Castles of Europe · the best castles in Europe · explore the finished reconstructions.