Edinburgh's story dates back to the dark ages when, the early form of its name Din Eidyn meaning "fort of Eidyn" is first documented. Castle Rock, stood on top of one of the now extinct volcanoes and until 1018, served as Scotland's most southerly border post. During the time of the reign of Malcolm Canmore, Castle Rock became one of the courts main seats and from here the town, which had by now been made a royal burgh, began to increase in size and importance to become the capital of Edinburgh.
Edinburgh city centre is roughly divided in two; the Old Town occupies the hilly terrain between the castle, on top of a rock that overlooks Edinburgh, and Holyrood Palace and for many years the city was confined within this relatively small area. After the Scot’s defeat at Flodden, people feared an English invasion and built a protecting wall around what is now the Old Town. Due to the limited space people built up, rather than out and the tenements sometimes reached fourteen storeys meaning nobles, artisans and rogues lived quite literally on top of each other, in a higgledy-piggledy network of streets, wynds, courts and closes.
Nothing much changed until the 18th century, when the Scottish parliament was disbanded by the 1707 Act of Union. Although the Scots fiercely resented their loss of independence, it did have unforeseen benefits for the capital. Firstly, there was increased trade and prosperity coming through the port at Leith and secondly, the threat of an English invasion vanished and with it went the constraints of the Flodden Wall.