History of Edinburgh
While the area around modern-day Edinburgh has been inhabited for thousands of years, the history of Edinburgh as a definite settlement can be traced to the early Middle Ages when a hillfort was established in the area, most likely on the Castle Rock. From the seventh to the tenth centuries it was part of the Anglian Kingdom of Northumbria, becoming thereafter a royal residence of the Scottish kings.