Llivia is a town under Spanish jurisdiction, a part of Girona, yet it is completely surrounded by French territory. The historical and political elements that created this situation relate to Llivia’s pre-Medieval status as a city rather than a village.
Further west, the principality of Andorra was divided between France and Spain during 1276, part of feudal settlement arranged by the Bishop of Urgell and the Count of Foix. Their political descendants, who continue to govern Andorra today, were the rulers of Spain and France, royal inherited or elected republican, as times changed.
Border specifics might not always be clear to the farm families and sheep herders who populated the area. Thousands of French troops migrated into Spain from the early decades of the 1800’s onward, starting but not limited to Napoleon’s invasion. Warning shouts and, if not heeded, shots, kept the traders and contraband runners inside the border lines of their respective countries.
19th c. Royalist France (the Bourbon Restoration after Napoleon I) was trying to shut out disease — cholera — and liberal ideas. Earlier, Napoleon was bent on keeping France free of England’s resources and troops who were in Spain. The area remained a hot spot, disputed particularly because surveyors and political forces didn’t know where one mountain range left off and the next began. What appeared to some observers as the northerly edge of the Pyrenees was actually the Corbieres range running from Narbonne on the Mediterranean coast, south west towards the Ariege.
Skirmishes and raids caused village archives to be lost, stolen or burned. Records were lost during intentional looting of churches, where rural demographic records were recorded. Fires and other disasters destroyed village archives.