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 heavy fighting. The historian Roy Haines describes the defeat as a "calamity of stunning proportions" for the English, whose losses were huge. In the aftermath of the defeat, Edward retreated to Dunbar, then travelled by ship to Berwick, and then back to York; in his absence, Stirling Castle quickly fell. Freed from English threats, Scotland's armies could now invade northern England. Bruce also drove back a subsequent English expedition north of the border and launched raids into Yorkshire and Lancashire. Buoyed by his military successes, Bruce's forces also invaded Ireland in 1315, in an attempt to free the country