When the Romans invaded Scotland they constructed a fort in Cramond, a suburb of modern Edinburgh, near their frontier, the Antonine Wall. When the Romans retreated, the area was much fought over by the Angles of Northumbria and the Picts, with Edinburgh held by the Kingdom of Northumbria until the tenth century, before it was passed back to the Scots. The site of Edinburgh Castle is believed to have housed a military fort since the Roman invasion. By the twelfth century a defensive Royal household was developed on the site by King David I, and the importance of Edinburgh grew, leading to the castle becoming the most besieged in the whole of the United Kingdom. The Lang Siege of 1571 would have a devastating effect on Edinburgh. With Scotland in the grip of a civil war, opposing forces fought for control of both the town and its castle for almost two years. Edinburgh Castle was eventually taken, but with both the castle and many of the town's buildings completely destroyed, massive rebuilding work was required. After centuries of peace Edinburgh once again experienced the devastating effects of war when it was bombed during the First World War. Many remnants of Edinburgh's military past can be found today, with the castle being one of the main tourist attractions in the country. The one o'clock gun has been fired from Edinburgh Castle since 1861 and the castle houses the National War Museum, the Scottish National War Memorial, The Royal Scots and The Royal Scots Dragoon Guards Museums, and remains the headquarters for the Royal Regiment of Scotland, with parts of the castle still operating as a military base. The author discusses all this and more in this illustrated look at Edinburgh's military history.