The document presented here is known as the Primer pariatge de Andorra (First pariage of Andorra) signed by Pere de Urtx, bishop of La Seu d'Urgell (also seen as Seo de Urgel), and Roger Bernat III, count of Foix and viscount of Castellbò, on September 8, 1278. Written in Latin, the document was drawn up by Arnau de Valle-Llebrera, notary public of the city of Lleida, Catalonia, Spain. The agreement settled the respective rights of the two sovereigns over the valleys of Andorra as well as resolved other matters of dispute. The first pariage was inscribed in the period of peace that followed an earlier agreement concluded in Agramunt, Catalonia. King Pedro III of Aragon (also seen as Pere) played a decisive role as a mediator in ending the longstanding feud between the count of Foix and the bishop of Urgel. The most important of their differences, although not the only one, was the dispute over the feudal state of Andorra. The document, divided into 11 articles, four of which refer exclusively to Andorra, begins by making an allusion to the many and varied discussions that preceded the agreement. Of the many pariages agreed upon between the count of Foix and both ecclesiastic and lay lords from both sides of the Pyrenees, the Andorran pariage, approved by both the crown and Pope Nicholas III, is the most complex and the only one to have survived to the present day, albeit with modifications to its original clauses. The longevity of the document was the result, among other factors, of the geographical situation of Andorra, i.e., its location between what became the separate states of France and Spain and their support for the agreement over the years. Also important was the acceptance by the Andorrans of the pariage system established by the conventions of 1278 and 1288 and their strong desire to maintain it, which was constantly manifested during the Middle Ages and is evident to the present day. Even though they were not directly involved in the negotiation of the pariage, the Andorran people nonetheless welcomed the conclusion of what was in effect a peace treaty that put an end to a long period of armed struggle and violence and that gave them the opportunity to become a neutral and independent country with its own institutions.