Scotland in the Middle Ages excommunication of Bruce and his followers by Pope Clement V, his support slowly strengthened; and by 1314 with the help of leading nobles such as Sir James Douglas and Thomas Randolph only the castles at Bothwell and Stirling remained under English control. Edward I had died in 1307. His heir Edward II moved an army north to break the siege of Stirling Castle and reassert control. Robert defeated that army at the Battle of Bannockburn in 1314, securing "de facto" independence. In 1320 the Declaration of Arbroath, a remonstrance to the pope from the nobles of Scotland, helped convince Pope
Robert the Bruce was again obtained from the nobles and the burghs, and a parliament was held to elect those who would meet later in the year with the English parliament to establish rules for the governance of Scotland. The Earl of Richmond, Edward's nephew, was to head up the subordinate government of Scotland. While all this took place, William Wallace was finally captured near Glasgow, and he was hanged, drawn, and quartered in London on 23 August 1305. In September 1305, Edward ordered Robert Bruce to put his castle at Kildrummy, "in the keeping of such a man as he himself will