The Governor of Stirling Castle was the military officer who commanded Stirling Castle, in Scotland. Control of the castle frequently passed between the Scots and the English during the Wars of Scottish Independence. The castle's military character was maintained for several centuries, the last siege occurring in 1746 during the Jacobite risings. It continued to be used as a military barracks until 1964.