There has been a royal castle on the castle rock since the 12th century. As one of the most important strongholds in the Kingdom of Scotland, it has been involved in many conflicts from the Wars of Scottish Independence in the 14th century to the Jacobite rising of 1745. There have been 26 sieges of the castle in its 1100 year history, making it the most besieged place in Great Britain and one of the most attacked in the world. It is now the second most popular tourist attraction in Scotland, after the National Museum, with 1.78 million visitors in 2017