According to legend, Charles the Great (Charlemagne) gave the Andorrans a charter in exchange for defeating the Moors. The area was ruled by the Count of Urgell, and then by the Bishop of the Diocese of Urgell. In return for property in Cerdanya, Borrell II, Count of Urgell, donated the Andorran lowlands to the Diocese of Urgell in 988. Andorra has been owned by the Bishop of Urgell, headquartered in Seu d’Urgell, since then.
Andorra had no military protection prior to 1095, and the Bishop of Urgell, knowing that the Count of Urgell intended to recapture the Andorran lowlands, requested the Lord of Caboet for assistance and protection. In 1095, the Lord of Caboet and the Bishop of Urgell swore an oath of co-sovereignty over Andorra. Arnalda, Arnau of Caboet’s daughter, married the Viscount of Castellb, and they both became Viscounts of Castellb and Cerdanya. Years later, their daughter, Ermessenda, married the French Count of Foix, Roger Bernat II. They were Counts of Foix, Viscounts of Castellb and Cerdanya, and co-sovereigns of Andorra under Roger Bernat II and Ermessenda I. (shared with the Bishop of Urgell).
A disagreement occurred in the 13th century between the Bishop of Urgell and the Count of Foix. The first paréage, signed in 1278 with the intervention of Aragon, stipulated that Andorra’s sovereignty be divided between the count of Foix (whose title would eventually pass to the French head of state) and the Bishop of Urgell, in Catalonia. The principality’s territory and governmental structure were thus established.
The co-title to Andorra went to the kings of Navarre through time. In 1607, King Henry IV of France issued an order that constituted the head of the French state and the Bishop of Urgell as Co-Princes of Andorra. The First French Empire conquered Catalonia and split it into four départements in 1812–13, with Andorra included in the district of Puigcerdà (département of Sègre).
17th to 19th centuries
During this time, Andorra’s medieval institutions and rural culture remained virtually unaltered. In 1866, the aristocratic oligarchy that had previously ruled the state was replaced by a Council General of 24 members chosen by suffrage and restricted to heads of family.
During World War I, Andorra declared war on Imperial Germany but did not participate in the combat. Because it was not included in the Treaty of Versailles, it remained in an official state of belligerence until 1958.
Following civil turmoil before to elections in 1933, France seized Andorra. Boris Skossyreff, an adventurer, made a proclamation in Urgell on July 12, 1934, proclaiming himself “Boris I, King of Andorra” and declared war on the Bishop of Urgell. On July 20, he was apprehended by Spanish police and eventually ejected from the country. From 1936 until 1940, a French military contingent was stationed in Andorra to protect the principality from the Spanish Civil War and Francoist Spain. In the latter phases of the conflict, Francoist soldiers crossed the Andorran border. Andorra stayed neutral throughout WWII and served as a major smuggling route between Vichy France and Spain.
Andorra has lived outside the mainstream of European history because to its relative isolation, with minimal connections to nations other than France, Spain, and Portugal. However, in recent years, the country’s booming tourism sector, as well as advancements in transportation and communications, have helped to break the country’s isolation. Its political system was modernized when it joined the United Nations and the Council of Europe in 1993.