Edinburgh Castle perches dramatically on the carggy volcanic Castle Rock and dominates the Edinburgh skyline.
The earliest recorded mention of Castle Rock is recorded in the 2nd century, when the mathematician and georgapher, Ptolemy (c. 83 - c. 168) makes refersence to a settlement of the Votadini tribe which was known to the Romans as 'Alauna', which means 'rock place'.
The castle disappears from records from the time and is lost in the mists of time of Ptolemy until around 600AD, when it is mentioned in the Brythonic epic Y Gododdin, which refers to Din Eidyn, "the stronghold of Eidyn".
The first recorded mention of the castle on the rock appears in the Scottish chronicler John of Fordun, writing in the fourteenth century, provides an account of the death of Malcolm III, when Malcolm's widow, the ailing Saint Margaret, learns of his death at the 'Castle of Maidens' in November 1093. Margaret died within a few days, and the castle was besieged by Malcolm's brother Donald Bane During the reigns of Malcolm III and his sons, Edinburgh Castle was to become one of the most significant royal centres in Scotland.
Between 1139 and 1150, Malcolm's youngest son, David I (1124–1153), held an assembly of nobles and churchmen, a precursor to the parliament of Scotland, at the castle between 1139 and 1150. The buildings or defences which existed then would probably have been of timber, although two twelfth century stone buildings are known.
One of these, St. Margaret's Chapel, built by David on the spot where his mother died in 1093, still stands at the summit of the rock. It was used as a private place of prayer up until the sixteenth century when it became a gunpowder store. Restored in 1851-1852. The chapel is still used for various religious ceremonies. The chapel contains a gospel book peviously owned by St. Margaret. The beautiful stained glass windows, designed by Douglas Strachan and installed in 1922, depict St. Andrew, St. Columba, St Margaret and Sir William Wallace.
Much damaged and often changing hands in the long and punishing wars of independence against England, Edinburgh Castle began to assume its present appearance in 1356 when King David II initiated his ambitious defensive works. The castle last saw military action during the Jacobite rising of 1745. The Jacobite army, under Charles Edward Stuart (Bonnie Prince Charlie) took Edinburgh in September 1745, but the castle's aged Deputy Governor, General George Preston, refused to surrender it. Following his victory over government forces at Prestonpans on 21 September, Charles attempted to blockade the castle. Preston bombarded Jacobite positions in the town. After several buildings had been demolished, and four people lay dead, Charles ceased the blockade. The Jacobites marched on to England in November, leaving Edinburgh to the castle garrison.
At the close of the Wars of Independence in 1357, David II set about rebuilding the castle. David's Tower was begun around 1367 which was completed by his nephew and successor, Robert II, the first Stewart king, in the 1370s. The tower occupied the site of the present Half Moon Battery, and was connected by a section of curtain wall to the Constable's Tower, built between 1375 and 1379 and situated on the site of the present Portcullis Gate.
The fifteenth century cannon known as Mons Meg stands outside St. Margaret's Chapel, built in Flanders to the order of Philip III, Duke of Burgundy in 1449, it was one of two cannon presented to his nephew by marriage, James II in 1457. The 6-tonne (13,000 lb) bombard is displayed alongside some of its 150-kilogram (330 lb) gun stones. It saw action only once, against the English at Norham Castle on the river Tweed. On 3 July 1558, Mons Meg was fired in salute to the marriage of Mary, Queen of Scots, to the French dauphin François II. The cannon has been defunct since its barrel burst on 30 October 1681 when firing a salute for the arrival of the the future King James VII and II.
The Royal Palace, located on the eastern side of Crown Square, comprises the former royal apartments, which were the residence of the later Stewart monarchs. Building on the apartments commenced in the mid fifteenth century, in the reign of King James IV.
The Palace took a battering during the Lang Seige of 1571, when the castle was held by supporters of Mary, Queen of Scots , against the Earl of Lennox, regent for his grandson, the infant King James VI and I but was extensively remodelled for the visit of James VI to the castle in 1617, when state apartments were added.
On the ground floor is a tiny room, known as the Birthing Room, where James I and VI, who grew up to unite the crowns of Scotland and England, was born after a protracted and difficult delivery in June 1566. It was redecorated for the visit of James in 1617, when the painted ceiling was added. The magnificently restored Laich (low) Hall, now called the King's Dining Room, is situated next the the Birthing Room.
On the first floor is the vaulted Crown Room, built in 1615 to house the Honours of Scotland, The Scottish Crown Jewels, the oldest surviving regalia in Britain which consist of a crown, a sword and a sceptre. The crown dates from 1540 and was made from Scottish gold melted down from a previous crown. It was first used when James V wore it for the coronation of his second Queen, Marie of Guise. It is encrusted with 20 precious stones and 22 gemstones, along with Scottish freshwater pearls. Following the Act of Union of 1707 they were placed in wooden chest in the palace and lay forgotten there for over a century until being re-discovered by the author Sir Walter Scott in 1818. Since 1819 they have remained on display in the Crown Room. The Stone of Scone, upon which the monarchs of Scotland were traditionally crowned, is also kept in the Crown Room since its return to Scotland in 1996. Crown Square, the principle courtyard of the castle, was developed in the fifteenth century.
The Great Hall measures 29 by 12.5 metres (95 by 41.0 ft), and was the chief place of state assembly in the castle, although there is no evidence that the Parliament of Scotland ever met here, as is sometimes reported. The hall was built during the reign of King James IV, the decorative carved stone corbels supporting the roof have Renaissance detailing, it is one of only two medieval halls in Scotland with an original hammerbeam roof. When Oliver Cromwell captured the castle in 1650, the Great Hall was used as a barracks for his soldiers and later became a military hospital until 1897, when it was restored by Hippolyte Blanc. Nearby is the Scottish National War Museum, designed by Sir Robert Lorimer, after the First World War.
Now in the care of Historic Scotland, the castle is Scotland's most popular tourist attraction, with over 1.3 million visitors in 2011.