Home › Political & Historical › Enclaves, Exclaves & Border Oddities
Llívia
A Spanish town entirely surrounded by France, left behind by the wording of a 17th-century treaty
Llívia is a small Catalan town in the Pyrenees that belongs to Spain but is surrounded on every side by France. It owes its odd status to a single word. When Spain ceded the northern part of the Cerdanya valley to France in 1659, the treaty handed over a set number of villages, and Spanish negotiators argued that Llívia, with its historic charter, was a town rather than a village, so it stayed Spanish. More than three and a half centuries later, its residents still live in Catalonia, vote in Spanish elections, and drive a short road across French fields to reach the rest of Spain. Since the Schengen Agreement removed border checks, the frontier around Llívia is almost invisible.
Llívia covers about 13 square kilometers of meadows and farmland on the broad, sunny floor of the Cerdanya valley, at around 1,220 meters above sea level. It is part of the province of Girona in Catalonia, and about 1,560 people lived there in 2025. A strip of French territory about 1.6 kilometers wide, belonging to the communes of Ur and Bourg-Madame, separates it from Spain, and the road from Llívia to the Spanish town of Puigcerdà crosses it. Under past agreements, that road was treated as a neutral route open to both countries. Above the old quarter stand the ruins of a medieval castle and a fortified Gothic church. The town museum preserves the Esteve pharmacy, a 15th-century apothecary often described as one of the oldest in Europe.
Llívia was a Roman settlement, Julia Libica, and later the capital of the Cerdanya. The 1659 Treaty of the Pyrenees, signed on Pheasant Island in the Bidasoa River, ended a long war between France and Spain and moved the border to the crest of the Pyrenees, giving France the counties of Roussillon and northern Cerdanya. The 1660 Treaty of Llívia confirmed that the 33 villages transferred did not include Llívia, which remained a Spanish enclave. Border details were refined in the 1866 Treaty of Bayonne. Since 1995, when both countries applied the Schengen rules, there have been no routine border checks. Cross-border cooperation now shapes daily life, including the shared Cerdanya Hospital in Puigcerdà, which opened in 2014 to serve patients from both sides of the valley.