The Treaty of the Pyrenees (French: Traité des Pyrénées, Spanish: Tratado de los Pirineos) was signed on 7 November 1659 to end the 1635-1659 war between France and Spain, a war that was initially a part of the wider Thirty Years' War. It was signed on Pheasant Island, a river island on the border between the two countries which has remained a French-Spanish condominium since the treaty. The kings Louis XIV of France and Philip IV of Spain were represented by their chief ministers, Cardinal Mazarin and Don Luis Méndez de Haro, respectively.
France entered the Thirty Years' War after the Spanish Habsburg victories in the Dutch Revolt in the 1620s and at the Battle of Nördlingen against Sweden in 1634. By 1640, France began to interfere in Spanish politics, aiding the revolt in Catalonia, while Spain responded by aiding the Fronde revolt in France in 1648. During the negotiations for the Peace of Westphalia in 1648, France gained the Sundgau and cut off Spanish access to the Netherlands from Austria, leading to open warfare between the French and Spanish.
After 23 years of war, an Anglo-French alliance was victorious at the Battle of the Dunes in June 14, 1658, but the following year the war ground to a halt when the French campaign to take Milan was defeated. Peace was settled by means of the Treaty of the Pyrenees in November 1659.
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.
Spain was forced to recognize and confirm all of the French gains at the Peace of Westphalia.
In exchange for the Spanish territorial losses, the French king pledged to quit his support for Portugal and renounced to his claim to the county of Barcelona, which the French crown had claimed ever since the Catalan Revolt (also known as Reapers' War). The Portuguese revolt in 1640, led by the Duke of Braganza, was supported monetarily by Cardinal Richelieu of France. After the Catalan Revolt, France had controlled the Principality of Catalonia from January 1641, when a combined Catalan and French force defeated the Spanish army at Battle of Montjuïc, until it was defeated by a Spanish army at Barcelona in 1652. Though the Spanish army reconquered most of Catalonia, the French retained Catalan territory north of the Pyrenees.
The treaty also arranged for a marriage between Louis XIV of France and Maria Theresa of Spain, the daughter of Philip IV of Spain. Maria Theresa was forced to renounce her claim to the Spanish throne, in return for a monetary settlement as part of her dowry. This settlement was never paid, a factor that eventually led to the War of Devolution in 1668. At the Meeting on the Isle of Pheasants in June 1660, the two monarchs and their ministers met, and the princess entered France.
The Treaty of the Pyrenees was the last major diplomatic achievement by Cardinal Mazarin. Combined with the Peace of Westphalia, it allowed Louis XIV remarkable stability and diplomatic advantage by means of a weakened Louis II de Bourbon, Prince de Condé and a weakened Spanish Crown, along with the agreed dowry, which was an important element in the French king's strategy:
All in all, by 1660, when the Swedish occupation of Poland was over, most of the European continent was at peace (though the third stage of the Portuguese Restoration War would soon begin), and the Bourbons had ended the dominance of the Habsburgs. In the Pyrenees, the treaty resulted in the establishment of border customs and restriction of the free cross-border flow of people and goods.
In the context of the territorial changes involved in the Treaty, France gained some territory, on both its northern and southern borders.