
Already in the Bronze Age they built a settlement on Castle Rock for the first time, but it is thought that a castle was only built in the twelfth century. Since the reign of David I until 1633 it was a royal residence. Afterwards it was used as military barracks, until it was recognized in the nineteenth century as …