I. From his coronation in 1331 to the victory of Edward Baliol at Halidon Hill in 1333.
II. His residence in France from 1334 to his return to Scotland in 1341.
III. His personal reign in Scotland from 1341 to his capture at Neville's Cross in 1340.
IV. His captivity in England from 1346 till his release by the treaty of Berwick in 1357.
V. The second period of his personal reign from 1357 to his death in 1371.
After the death of Robert the Bruce, Thomas Randolph, earl of Moray, governed the kingdom with vigour for three years; but his death, not free from suspicion of poison, in July 1332, exposed Scotland to the peril of a disputed regency. The estates met at Perth, and after long discussion chose, on 2 Aug., Donald, earl of Mar, the nephew of Bruce.
The choice was unfortunate, and there is reason to suppose the prudence of Bruce had foreseen the incapacity of Mar when he preferred Douglas in the succession to the regency, which the youth of David made inevitably long. But Douglas had by this time fallen in the Moorish war in Spain. Encouraged by the divisions amongst the Scottish nobles, and secretly aided by Edward III, Edward the son of John Baliol, with many barons who had lost their Scotch estates by espousing the English side, made a descent on the coast of Fife. The non-fulfilment of one of the conditions of the treaty of Northampton, by which these estates were to be restored, gave a pretext for renewing the war. News of Baliol's landing at Kinghorn was brought to the parliament at Perth the day of the regent's election, and Baliol, losing no time, met the regent and barons at the Muir of Dupplin, near Perth, on 11 Aug., nine days after he landed. Though greatly superior in numbers, the regent was totally routed. He himself, along with Thomas, earl of Moray, the son of Randolph, the earl of Monteith, and many other nobles, were slain. In September Baliol was crowned at Scone. His captive, the Earl of Fife, placed the crown on his head; but he had not yet conquered the country. Perth was almost immediately retaken by David's adherents, and Baliol was defeated at Annan in Dumfries by John Randolph, now Earl of Moray, and forced to leave Scotland. In 1333 Edward III came with a great force to assist Baliol, and routed at Halidon Hill, on 20 July, the Scotch army led by Archibald Douglas, lord of Galloway, who succeeded to the regency after the death of Mar. Berwick capitulated, and Edward became master of Scotland south of the Forth. On 10 Feb. 1334 Beliol, at an assembly held at Edinburgh, surrendered Berwick absolutely to the English king, and, as security for an annual payment of 2,000l., promised to put into nis hands all the castles of south-eastern Scotland—Jedburgh, Selkirk, Peebles, Dumfries, Haddington, Edinburgh, and Linlithgow. Edward, like his grandfather, made a new ordinance for the Scottish government, but his officers never obtained complete possession of their posts. Meantime David and the queen had taken refuge at Dumbarton, one of the fortresses which held out under its brave governor Malcolm Fleming; but, Scotland being deemed an unsafe residence, he took advantage of a ship which Philip VI, the French king, sent for him, and along with Joanna and his sisters landed at Boulogne on 14 May 1334.
The royal exiles were splendidly received at Paris. Château Gaillard, the castle built by Cœur de Lion on the Seine close to the town of Andelys, was assigned for their residence, where they were maintained by Philip, though Froissart's statement that little came from Scotland to support them is disproved by the exchequer records, which, show that besides provisions 4,333l. 18s. 7d, was remitted between May 1334 and January 1340.
The course of events in Scotland during the next seven years is outside the life of David. A new race of patriotic leaders—Murray of Bothwell, Robert the Steward, Douglas the Knight of Liddesdale—worthily sustained the fame of Robert Bruce, Douglas, and Randolph. At first they carried on the war with varying success, but ultimately they freed the country and retook all the castles. The greater attraction of a French campaign prevented Edward from ever using his whole strength against the northern kingdom. Not much is known of David's residence in France. He was of an age too young to take an active part in affairs, but not too young to learn the lessons of the extravagant and vain though splendid pomp of chivalry which distinguished the court of Philip VI. Onecharacteristic scene at which he was present is described by Froissart—the meeting of the armies of the French and English kings about the end of October 1339. Three years previously a fleet, fitted out by David Bruce with the aid of the French king, made a diversion in favour of the Scotch, plundered the Channel islands, and seized many ships near the Isle of Wight. Edward retaliated oy claiming the crown of France in October 1337, and, after two years of preparation, in September 1339 he crossed the Flemish border. At Vironfosse the two hosts came face to face. The English under