Sir Robert Lauder of Quarrelwood was constable of Urquhart Castle in 1329. After fighting at the Battle of Halidon Hill in 1333, where the Scots were defeated, Lauder returned to hold Urquhart against another threatened English invasion. It is recorded as being one of only five castles in Scotland held by the Scots at this time (the others were Dumbarton, Lochleven, Kildrummy and Loch Doon). In 1342, David II spent the summer hunting at Urquhart, the only king to have stayed here. Over the next two hundred years, the Great Glen was raided frequently by the MacDonald Lords of the Isles, powerful rulers of a semi-independent kingdom in western Scotland, with a claim to the earldom of Ross. In 1395, Domhnall of Islay seized Urquhart Castle from the crown, and managed to retain it for more than 15 years. In 1411, he marched through the glen to take on the king's supporters at the Battle of Harlaw. Although an indecisive battle, Domhnall subsequently lost the initiative and the crown was soon back in control of Urquhart. In 1437 Domhnall's son Alexander, now Earl of Ross, raided around Glen Urquhart but could not take the castle. Royal funds were granted to shore up the castle's defences. Alexander's son John succeeded his father in 1449, aged 16. In 1452 he too led a raid up the Great Glen, seizing Urquhart, and subsequently obtained a grant of the lands and castle of Urquhart for life. However, in 1462 John made an agreement with Edward IV of England against the Scottish King James III. When this became known to James in 1476, John was stripped of his titles, and Urquhart was turned over to an ally, the Earl of Huntly. Huntly brought in Sir Duncan Grant of Freuchie to restore order to the area around Urquhart Castle. His son John Grant of Freuchie (d.1538) was given a five-year lease of the Glen Urquhart estate in 1502. In 1509, Urquhart Castle, along with the estates of Glen Urquhart and Glenmoriston, was granted by James IV to John Grant in perpetuity, on condition that he repair and rebuild the castle. The Grants maintained their ownership of the castle until 1512, although the raids from the west continued. In 1513, following the disaster of Flodden, Sir Donald MacDonald of Lochalsh attempted to gain from the disarray in Scotland by claiming the Lordship of the Isles and occupying Urquhart Castle.