According to one tradition, Charlemagne gave the region the name Andorra for its supposed likeness to the biblical town of Endor. Tradition also asserts that Charlemagne granted the Andorran people a charter in return for their help in fighting the Moors, and that Charlemagne's son Louis I, king of France, confirmed the charter.
It is generally agreed that Charles the Bald, the son of Louis, appointed the count of Urgel (now Seo de Urgel) overlord of Andorra and gave him the right to collect the imperial tribute. The bishop of Urgel, however, also claimed Andorra as part of the endowment of his cathedral. In 1226, the lords of the countship of Foix, in present-day south-central France, by marriage became heirs to the counts of Urgel. The quarrels between the Spanish bishop and the French counts over rights in Andorra led in 1278 to their adoption of a paréage, a feudal institution recognizing equal rights of two lords to a seigniorage.
In 1505, Germaine of Foix married Ferdinand V of Castile, thereby bringing the lordship of Andorra under Spanish rule. On taking over the kingdom in 1519, Emperor Charles V granted the lordship of Les Valls, as it was then known, to Germaine of Foix's line in perpetuity. Henry III of Navarre, who was also count of Foix, in 1589 ascended the French throne as Henry IV, and by an edict of 1607 established the head of the French state, along with the bishop of Urgel, as co-princes of Andorra.
In 1793, the French revolutionary government refused the traditional Andorran tribute as smacking of feudalism and renounced its suzerainty, despite the wish of the Andorrans to enjoy French protection and avoid being under exclusively Spanish influence.
Andorra remained neutral in the Napoleonic wars with Spain. Napoleon restored the co-principality in 1806 after the Andorrans petitioned him to do so. French title to the principality subsequently passed from the kings to the president of France.
Long an impoverished land having little contact with any nations other than adjoining France and Spain, Andorra after World War II achieved considerable prosperity through a developing tourist industry. This development, abetted by improvements in transport and communications, has tended to break down Andorra's isolation and to bring Andorrans into the mainstream of European history. Public demands for democratic reforms led to the extension of the franchise to women in the 1970s and to the creation of new and more fully autonomous organs of government in the early 1980s.
Andorra formally became a parliamentary democracy in May 1993 following approval of a new constitution by a popular referendum in March 1993. The new constitution retained the French and Spanish co-princes although with reduced, and narrowly defined, powers. Civil rights were greatly expanded including the legalization of political parties and trade unions, and provision was made for an independent judiciary. Andorra entered into a customs union with the European Communities (now the EU) in 1991 and was admitted to the UN on 28 July 1993. The country has been seeking ways to improve its export potential and increase its economic ties with its European neighbors. The financial services sector of the economy is highly important, given Andorra's status as a tax haven and its banking secrecy laws.