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 the hinterlands of Inverness and a second failed attempt to take Elgin, Bruce finally achieved his landmark defeat of Comyn at the Battle of Inverurie in May 1308; he then overran Buchan and defeated the English garrison at Aberdeen. The Harrying of Buchan in 1308 was ordered by Bruce to make sure all Comyn family support was extinguished. Buchan had a very large population because it was the agricultural capital of northern Scotland, and much of its population was loyal to the Comyn family even after the defeat of the Earl of Buchan. Most of the Comyn castles in Moray,