The first documentary record of Urquhart Castle occurs in 1296, when it was captured by Edward I of England. Edward's invasion marked the beginning of the Wars of Scottish Independence, which would go on intermittently until 1357. Edward appointed Sir William fitz Warin as constable to hold the castle for the English. In 1297 he was ambushed by Sir Andrew de Moray while returning from Inverness, and Moray subsequently laid siege to the castle, launching an unsuccessful night attack. The English must have been dislodged soon after, since in 1298 Urquhart was again controlled by the Scots. In 1303 Sir Alexander de Forbes failed to hold off another English assault. This time Edward installed as governor Alexander Comyn, brother of John, as the family had sided with the English against Robert Bruce. Following his murder of the Red Comyn in 1306, Bruce completed his defeat of the Comyns when he marched through the Great Glen in 1307, taking the castles of Inverlochy, Urquhart and Inverness. After this time Urquhart became a royal castle, held for the crown by a series of constables.