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 stated Bruce did not participate and in the following month decided to lay waste Annandale and burn Ayr Castle, to prevent it being garrisoned by the English. William Wallace resigned as Guardian of Scotland after his defeat at the Battle of Falkirk. He was succeeded by Robert Bruce and John Comyn as joint Guardians, but they could not see past their personal differences. As a nephew and supporter of King John, and as someone with a serious claim to the Scottish throne, Comyn was Bruce's enemy. In 1299, William Lamberton, Bishop of St. Andrews, was appointed as a third, neutral