structural:summarization, structural:scholar_edition
Final military and diplomatic accomplishments (1658–1661)

The last years of Mazarin's life, between 1658 and his death in 1661, were marked by a series of major diplomatic victories, including the marriage of Louis XIV. In 1658, after long and intense preparation, Mazarin unveiled the League of the Rhine, a new group of fifty small German principalities which were now linked by a treaty with France. They promised not to allow enemy forces pass through them to invade France. This treaty weakened both the old Holy Roman Empire and the Austrian Empire of the Habsburgs, This gave a new measure of security to France's eastern border. In the same month, Marshal Turenne decisively defeated the army of Condé at the Battle of the Dunes in Flanders. This marked the end of the threats to France from the north, from the Spanish Netherlands.

Negotiation of a draft peace treaty between France and Spain took place between February and June 1659, but many critical details remained unresolved. Mazarin and Spain's Dom Luis de Haro personally took charge of the negotiations on 13 August. Their conferences, which continued for three months, were held on the French-Spanish border on the island of Faisans, midway between French Hendaye and Spanish Fuenterrabía, in the river Bidassoa. The resulting Treaty of the Pyrenees was signed on 7 November 1659 and added Artois, Cerdanya, and Roussillon as new provinces of France. It also provided for an even more important diplomatic event carefully arranged by Mazarin, the marriage of Louis XIV with Maria Theresa of Spain, the French celebration of which followed in June 1660 in nearby Saint-Jean-de-Luz. The couple made a triumphant entry into Paris on 26 August 1660. This marriage and accompanying agreements ended, at least for a time, the long and costly wars between the Austrians and France.

Mazarin, as the de facto ruler of France, played a crucial role in establishing the Westphalian principles that would guide European states' foreign policy and the prevailing world order. Some of these principles, such as the nation state's sovereignty over its territory and domestic affairs and the legal equality among states, remain the basis of international law to this day.