 In 1034, the castle became capital of the County of Foix and played a decisive role in medieval military history.During the two following centuries, the castle was home to Counts with shining personalities who became the soul of the Occitan resistance during the crusade against the Albigensians.The county became a privileged refuge for persecuted Cathars.