and Philip's rightful inheritance, Roger-Bernard led a French army into Navarre in September 1276. He took the capital city of Pamplona by force and razed it. In gladful compensation for this, Philip III restored all the count's remaining territories south of the Pas de La Barre. Formation of Andorra Perhaps the most lasting of Roger-Bernard's policies was his diplomatic agreement with the bishop of Urgell concerning the possession of Andorra, a small mountain landlocked territory with a long history of quarrels over its lordship between bishop and count. On 8 September 1278, after long negotiations, the count and the bishop concluded a paréage, a form of condominium, over the disputed country. Though slightly modified a little later (the same year), the paréage remains the governing system of Andorra to this day, though the office of Count of Foix has devolved to the Presidency of France since that time. Conflict with Aragon In Spring 1280, the long-stewing conflict between Roger-Bernard and Peter of Aragon broke out into open rebellion. The count of Foix formed a coalition of other dissatisfied Catalan nobles, including Arnold Roger I of Pallars Sobirà and Ermengol X of Urgell, and revolted against Peter. Besieged in Balaguer, he was forced to surrender on 22 July and was imprisoned. While the other leaders of the revolt were released the next year, Roger-Bernard languished in an Aragonese dungeon until December 1283, at which time it was politically expedient to free him in exchange for the viscounty of Castelbon in an effort to stave off French aggression in the form of the so-called "Aragonese Crusade." Roger-Bernard, however, was not beholden to the then-excommunicate king of Aragon and readily sided with the invading French. First, on 25 May 1285, Elne and then, on 7 September, Girona surrendered to their French besiegers, Raimond-Roger, brother of the Count of Pallars Sobirà, negotiating the surrenders with the count of Foix. Relationship with Philip IV In 1290, Roger-Bernard tried to stop the seneschals of Toulouse and Carcassonne from interfering in his internal affairs, such as the administration of justice and the collection of taxes. Philip IV, now King of France, refused to call off his functionaries and diminish his own authority in the south and was thus forced to confiscate two of the count's castles as punishment for his disobedience and lack of cooperation with the crown. Nonetheless, in 1293, the king finally intervened to order