From the Bronze and Iron Ages, the defensive advantages of the Castle rock were apparent to the earliest settlers of Edinburgh. The name of Edinburgh has a couple of possible origins, such as Dun Eadain – “the Fortress on the Slope” and from one of its first rulers, King Edwin (Edwin’s Burgh). It is also affectionately known as 'Auld Reekie' on account of the smoke that was once generated by the city's many chimneys. The town began to develop beyond the Castle in the 11th century, with the Royal Mile forming a backbone which travels a Scottish mile down to Holyrood Palace.
Edinburgh developed as Scotland’s legal and political centre and gained the status of 'royal burgh' from Robert the Bruce. It was an important stage for the events surrounding the Scottish Reformation (Scotland’s move to Protestantism in 1560), and with the merging of the crowns of England and Scotland in 1603 and finally the union of the Parliaments in 1707, Edinburgh became more of a regional centre than a national capital.
Edinburgh expanded its borders over the years to include various smaller settlements. They continue to keep their character, especially in Leith, which has a proud maritime history of trade with the outside world (just look at the old merchant houses and bond buildings still standing there).
Scotland has never lost its legal independence with the main courts of the Scottish legal system still based in Edinburgh. Also, it remains the UK’s second financial centre and Scotland’s tourism gateway. The revival of the Scottish Parliament in Edinburgh also sees the city's rise as a centre of political influence again.