When King Alexander III of Scotland died in 1286, his heir was his granddaughter Margaret, Maid of Norway. In 1289, King Edward I of England negotiated to have his son, Edward II of England become her husband and share the crown of Scotland. 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 stepped in to choose who would be king from among the candidates who had any claim to the throne. He chose John of Scotland. But, Edward treated the Scottish king badly. When King John tried to break free, Edward put him in prison, then allowed him to live in France. In 1296 Edward invaded Scotland with his army to take everything for himself. Scotland remained without a king 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 a fight broke out. John Comyn was killed and Robert the Bruce was crowned king three weeks later at Scone. Accused of murdering Comyn, the Bruce was excommunicated by the Pope. During the wars that followed, the Scots won a major battle at the Battle of Bannockburn in 1314. In 1317 the pope called for a two year truce, which Scotland ignored. For failing to listen to him, he excommunicated all of Scotland.