France gained Roussillon (including Perpignan) and the northern half of Cerdanya, Montmédy and other parts of Luxembourg, Artois and other towns in Flanders, including Arras, Béthune, Gravelines and Thionville, and a new border with Spain was fixed at the Pyrenees. However, the treaty stipulated only that all "villages" north of the Pyrenees should become part of France. Because it was a villa, the historic town of Llívia, once the capital of Cerdanya, was thus unintentionally exempted from the treaty and became a Spanish exclave as part of the "comarca" of Baixa Cerdanya, in the Spanish province of Girona. This border was not properly settled until the Treaty of Bayonne was signed in 1856, with its final acts accepted 12 years later. On the western Pyrenees a definite borderline was drawn and decisions made as to the politico-administrative affiliation of bordering areas in the Basque region—Baztan, Aldude, Valcarlos.