In 1314, Château Gaillard was the prison of Margaret and Blanche of Burgundy, who both later became queens of France; they had been convicted of adultery in the "Tour de Nesle" Affair, and after having their heads shaved they were locked away in the fortress, where they remained even during their respective reigns. Following the Scottish defeat at the Battle of Halidon Hill in 1333 during the Second War of Scottish Independence, the child-king David II and certain of his court were forced to flee to France for safety. At the time, southern Scotland was occupied by the forces of King Edward III of England. David, then nine years old, and his bride Joan of the Tower, the twelve-year-old daughter of Edward II, were granted the use of Château Gaillard by Philip VI. It remained their residence until David's return to Scotland in 1341. David did not stay out of English hands for long after his return; he was captured after the Battle of Neville's Cross in 1346 and endured an eleven-year captivity in the Tower of London.