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
Battle of Halidon Hill ultimate victor. The Treaty of Northampton in 1328 brought an end to over thirty years of intermittent warfare following the defeat of Edward II by Robert Bruce. Bruce's own death the following year opened up an opportunity for the disinherited, Balliol and the English to invade Scotland once more. In 1332 under the leadership of Edward Balliol, son of King John Balliol, and Henry Beaumont, 4th Earl of Buchan, these men invaded Scotland with the full support of Edward III, defeating the Bruce loyalists at the Battle of Dupplin Moor. Building on this success Balliol was crowned King of Scotland.