In AD 79 the Romans mention meeting the Celtic tribe of Votadinii in an area now known as Edinburgh.
This was about the furthest north the Romans made it, and the Celts were not amused by the Roman antics, and harassed them considerably. The Romans retreated to positions behind Hadrian’s Wall around 211 AD, and left Britain entirely by the year 410.
By the sixth century four kingdoms controlled what is now Scotland, and Duncan I became the first King of a unified Scotland in 1035. King Malcolm III built the castle at Edinburgh before he died in 1093. His son David I built an Abbey at Holyrood, at the other end of the so-called “Royal Mile.” This became the focus of the thriving town of Edinburgh, and Leith nearby became its port to the outside world via the sea. Robert the Bruce granted the city a Royal Charter in 1329, and by the 1500s Edinburgh was the capitol of Scotland.
In fact the entire town was at one time on the hill surrounding the castle on its steep and craggy hill. It wasn’t until the 1700s that the Loch below the castle was filled in and the expanded outward for the first time.
An age of “enlightenment” ensued, lasting through the 1800s when Edinburgh grew into the beautiful city it is today.