Tradition credits Andorra's independence to Charlemagne, who captured the region from the Muslims in 803 AD. His son, Louis the Pious, presented the area's inhabitants with a charter of liberties. The earliest known document concerning Andorra is an order in 843 from Charlemagne's grandson, Charles II, granting the Valls d'Andorra (Valleys of Andorra) to Sunifred, Count of Urgell, from the nearby Spanish town of La Seu d'Urgell. The Act of Consecration for La Seu's cathedral, which dates from around 860, confirms Andorra's parishes as part of the count's territory.
The country's first constitutional documents, the Paretages (the Acts of Joint Overlordship), were drawn up in 1278 and 1288 to settle conflicting claims of seigniorial rights made by the Catholic Bishop of Urgell and the Count of Foix in France. These agreements, under which the bishop and count agreed to share sovereignty, form the basis of Andorra's government to this day and are among the oldest such documents still in force.
The peculiar political equilibrium created by the arrangement saved Andorra from being swallowed up by its powerful neighbours, despite recurrent tensions between the co-princes and the powers they represented. After the French Revolution, France - as inheritor of the lands and prerogatives of the Count of Foix - abolished all feudal rights, including the role of the French head of state in Andorran affairs. This was reinstated by Napoleon in 1806, at the request of the Andorrans, who feared Spanish hegemony.
Andorra's modern role as a centre for duty-free shopping grew out of the business of smuggling of French goods to Spain during the Spanish Civil War and Spanish goods to France during WWII. Andorra remained neutral throughout both world wars.
In March 1993, Andorrans voted to establish the country as an independent, democratic 'parliamentary co-principality', placing full sovereignty in the hands of the Andorran people, with the French and Spanish co-princes continuing to function as joint heads of state with greatly reduced powers. Andorra joined the Council of Europe in 1994.
In recent years Andorra has maintained its status as a centre for skiing and duty-free shopping. These activities are bringing the principality not just wealth, foreign workers and over 11 million visitors a year, but also unsightly development and heavy traffic for several kilometres on either side of the capital, Andorra la Vella.
