Château Gaillard was captured in 1204 by the king of France, Philip II, after a lengthy siege. In the mid-14th century, the castle was the residence of the exiled David II of Scotland. The castle changed hands several times in the Hundred Years' War, but in 1449 the French king captured Château Gaillard from the English king definitively, and from then on it remained in French ownership. Henry IV of France ordered the demolition of Château Gaillard in 1599; although it was in ruins at the time, it was felt to be a threat to the security of the local population. The castle ruins are listed as a "monument historique" by the French Ministry of Culture. The inner bailey is open to the public from March to November, and the outer baileys are open all year.