When the Treaty of Corbeil is signed in 1258, the border between France and Spain is right to the south of the castle. In the year 1240, after the Albigensian Crusade against the Cathars, the castle becomes French. It is extended, and there is a garrison placed there; it protects against invasions until the 16th century when Roussillon becomes a French territory.