Legend has it that Charlemagne founded Andorra in the year 805 in recognition of the help provided by its inhabitants in their struggle against the Saracens.
However, the first document that mentions the country is the act of consecration of the Cathedral of Santa María de Urgell in the year 839, which appointed the parishes of Andorra as the fiefdom of the counts of Urgell.
After years of intense struggles between the local counts and the Church to achieve sovereignty over Andorra, hostilities were brought to an end by the signing of two treaties called the Pareatges. They were signed in 1278 and 1288 by the Archbishop of Urgell, Pere d'Urg, and the Count of Foix, Roger Bernat III. The Pareatges established shared sovereignty between the two lords of the land, and thus the Principality of Andorra was born.
Over the course of time, the figure of Co-Prince of Andorra passed from the Count of Foix to the crown of France, and with the Republic to the President of France. The Archbishop of Urgell, however, has retained its title of Co-Prince of Andorra to the present day.
The first parliamentary form was created in 1419 as the Consell de la Terra (Council of the Land), which was responsible for solving the problems of the Andorran community. Nowadays known as the Consell General, it is the parliament and legislative body of Andorra with a single chamber, composed of 28 members, of mixed, equal representation from the national population and its 7 parishes. The Principality holds elections every 4 years.
In 1981, with the creation of the Consell Executiu, or Government, work began on the latest and most decisive reforms to the Principality of Andorra until the entry into force of the 1993 Constitution. The Government makes the national and international policy of Andorra, as well as administration of the State, and is vested with regulatory power. It is formed by the Head of Government (Cap de Govern) and his/her ministers.
Today, Andorra is a democratic and social state under the rule of law, which adopted its Constitution on 14 March 1993 by referendum, the year in which it also joined the UN.
The Andorran territory is divided into seven administrative divisions, known as parishes, which have political and administrative authority. At the head of every parish there is a Cònsol and a Sub-Cònsol, in addition to the corresponding administrative positions. The building where this administration is housed is known as a "Comú", or a Common.