Llívia ( Catalan pronunciation: ) is a town in the comarca of Cerdanya, province of Girona, Catalonia, Spain. It is a Spanish exclave within the French département of Pyrénées-Orientales. In 2009, the municipality of Llívia had a total population of 1,589.
Llívia : In 1659, the Treaty of the Pyrenees ceded the comarques of Roussillon, Conflent, Capcir, Vallespir, and northern Cerdanya ("Cerdagne") to the French crown. Llívia did not become part of the French kingdom as the treaty stipulated that only villages were to be ceded to France, and Llívia was considered a city and not a village because of its status as the ancient capital of Cerdanya.
In 1939, at the end of the Spanish Civil War, there was some discussion[by whom?] of Llívia remaining a free territory of the defeated Republican government, but this was never carried out.