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
Richard Óg de Burgh, 2nd Earl of Ulster of King Robert the Bruce of Scotland. However, this did not stop him leading his forces from Ireland to support England's King Edward I in his Scottish campaigns and when the forces of Edward Bruce invaded Ulster in 1315, the Earl led a force against him, but was beaten at Connor in Antrim. The invasion of Bruce and the uprising of Felim Ó Conchúir in Connacht left him virtually without authority in his lands, but Ó Conchúir was killed in 1316 at the Second Battle of Athenry, and he was able to recover Ulster after the defeat of Bruce at