Malcolm was on the defeated Bruce side at the Battle of Halidon Hill in July 1333, but managed to escape, and fled back to Dumbarton. He was partly responsible for sending the boy king, Robert's son David II from Dumbarton to exile in France. When David II returned to Scotland in 1341, David granted Malcolm much of western Galloway (Wigtownshire) and the burgh of Wigtown, and created for him the new title, "Earl of Wigtown". It was the first new earldom in Scotland for more than a century (the last was the earldom of Sutherland). Presumably the intention was to re-establish the power of the Bruce dynasty in the strongly Balliol province.