Andorra is a territory full of history that you probably do not know. The first mentions of the Principality appear in the 1st century BC, a period in which it was part of the Roman Empire. The name of Andorra appears since it is related how its inhabitants, called Andosinos, fight against Hannibal's invasion.
The country goes through several conquests until the year 805 in which Charlemagne forms the territory. The latter appreciates the help of the Andorran people in the fight against the Muslim occupation by declaring the territory as sovereign and granting it its protection.
However, it is not until the act of consecration of the cathedral of Urgell in the 9th century that Andorra is officially mentioned in a document. More specifically, this document indicates that the Andorran territory forms part of the fiefdoms of the county of Urgel.
Andorra will have to wait until 1288, the year in which the pariatges are signed. The agreements officially ratify that the territory is independent and consolidate the two co-princes as heads of state. Some consider this document the first European constitution, although it cannot be included in the modern concept of a constitution.