Treaty of the Pyrenees

The Treaty of the Pyrenees was signed on 7 November 1659 and ended the Franco-Spanish War that had begun in 1635.
Negotiations were conducted and the treaty was signed on Pheasant Island, situated in the middle of the Bidasoa River on the border between the two countries, which has remained a French-Spanish condominium ever since. It was signed by Louis XIV of France and Philip IV of Spain, as well as their chief ministers, Cardinal Mazarin and Don Luis Méndez de Haro.
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, and leading to an increase in hostilities between the French and Spanish.
An Anglo-French alliance was victorious at the Battle of the Dunes on 14 June 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 town, 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 his claim to the Principality of Catalonia, which the French crown had claimed ever since the Catalan Revolt, also known as the 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 1667. At the Meeting on the Isle of Pheasants in June 1660, the two monarchs and their ministers met, and the princess entered France.
In addition, the English received Dunkirk, although they elected to sell it to France in 1662.
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, Grand 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. The treaty also settled indefinitely the century and half long litigation over the Kingdom of Navarre, while the dispute over the Aldudes remained in place still throughout the 18th century.
In the context of the territorial changes involved in the treaty, France gained some territory, on both its northern and southern borders.