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 appear not to have expected the Scots to give battle here, and as a result had kept their forces in marching, rather than battle, order, with the archers − who would usually have been used to break up enemy spear formations − at the back, rather than the front, of the army. The English cavalry found it hard to operate in the cramped terrain and were crushed by Robert's spearmen. The English army was overwhelmed and its leaders were unable to regain control. Edward II was dragged from the battlefield, hotly pursued by the Scottish forces, and only just escaped