The shadows of coming trouble had fallen upon Scotland before the death of Alexander III. The family of the King had been swept away by death. His first queen, Margaret, eldest daughter of Henry III. and sister of Edward I. of England, had died in 1275. His younger son, David, had died in 1280. His elder son, Alexander, who married Margaret, daughter of Guy, Count of Flanders, in 1282, had died without issue early in 1283–84. His only daughter, who married Eric II., King of Norway, in 1281, had also died early in 1283–84, leaving a daughter. Alexander was little over forty. Still there is no assurance of length of days; and if he should die there would be a minority, probably a disputed succession, possibly an active revival of the English claim to over-lordship. In these circumstances, Alexander at once proceeded to take such precautions as he could. He summoned a Parliament at Scone on February 5, 1283–84, and obtained from his nobles their solemn acknowledgment of Margaret, Princess of Norway, as heiress of Scotland, failing issue of himself and of his late son. Towards the end of next year, he also married a second wife, Joleta (or Iolande), daughter of the Count de Dreux; but she bore him no child. Alexander must have often and anxiously reflected upon the likelihood of a recurrence of such baronial rivalries as had proved a grave danger to the country during his own minority. On his tragic death on March 19, 1285–86, the hopes of the nation were left to rest upon the fragile Maid of Norway.
For a short period the affairs of the kingdom maintained a placid course. On April 11, 1286, the magnates assembled at Scone, and selected six of their number to act as a Council of Regency, with the official designation of 'the Guardians of the Kingdom of Scotland appointed by the common advice.' The Bishop of St. Andrews and the Earls of Fife and Buchan were to administer the districts north of the Forth; the Bishop of Glasgow, Comyn of Badenoch, and James the Steward of Scotland, were to rule the lands south of the Forth.