Edinburgh Castle stands on Castle Rock, which has been occupied by humans since at least the Iron Age. There has been a royal castle on the rock since at least the reign of David I in the 12th century. As one of the most important strongholds in the Kingdom of Scotland, Edinburgh Castle was involved in many historical conflicts from the Wars of Scottish Independence in the 14th century to the Jacobite rising of 1745.