When King Alexander III of Scotland died in 1286, his heir was his granddaughter Margaret, Maid of Norway. King Edward I of England arranged to have his son, Edward II of England, become her husband and share the crown of Scotland in 1289. But Margaret died on her way from Norway to Scotland in 1290. This began a period in Scotland called the First Interregnum (1290–1292). Scotland was without a monarch. Edward I was invited to choose who would be king from among the candidates who had any claim to be king. He chose John of Scotland. But Edward now claimed power over the Scottish king. Balliol could do nothing without Edward's approval. In July 1295 the Scottish Parliament met and took most of the power away from John Balliol and gave it to a group of men they elected called the "Council of Twelve." This group made an agreement with King Philip IV of France called the Auld Alliance. King Edward gathered his army at Newcastle and prepared to invade Scotland. He brought his army to Berwick and captured the town and castle. John Balliol sent King Edward letters refusing to recognize Edward's right to rule Scotland. After Edward had captured all the castles in Scotland, John Balliol surrendered to him. John Balliol was sent to prison in London, then later Edward allowed him to live in France. In 1296 Edward made every man in Scotland who owned land promise to be loyal to him. Scotland remained without a king of their own until 1306 when Robert the Bruce declared himself king of Scotland defying Edward I. Just before doing this Robert the Bruce had been involved in a dispute with John Comyn. The two met before the altar in Greyfriars Church in Dumfries in 1306 and in a fight John Comyn was killed. Robert the Bruce was crowned king three weeks later at Scone. Accused of murdering Comyn, Bruce was excommunicated by the Pope. Edward sent his men after Bruce but was unable to capture Him. A series of border skirmishes and wars went on. In 1310 Edward again invaded Scotland but with little effect. Between 1310 and 1314 a large number of castles were captured from the occupying English soldiers by Bruce and his followers.