linguistic:translation, stylistic:style_transfer, linguistic:paraphrasing
Wars against France

French expansion increasingly threatened the empire, especially the seizure of the strategic Duchy of Lorraine in 1670, followed by the 1672 Franco-Dutch War. By mid-June, the Dutch Republic teetered at the brink of destruction, which led Leopold to agree to an alliance with Brandenburg-Prussia and the Republic on 25 June. However, he was also facing a revolt in Hungary and viewed French conquests in the Rhineland a higher priority than helping the Dutch. His commander, Raimondo Montecuccoli, was ordered to remain on the defensive and avoid a direct conflict. Chaotic logistics made it impossible to maintain the troops and Brandenburg left the war in June 1673 under the Treaty of Vossem.

An anti-French Quadruple Alliance was formed in August, consisting of the Dutch Republic, Spain, Emperor Leopold, and the Duke of Lorraine, while in May 1674, the Imperial Diet declared it an Imperial war. The 1678 Treaty of Nijmegen is generally seen as a French victory, although the Alliance succeeded in limiting their gains.

Almost immediately after the conclusion of peace Louis renewed his aggressions on the German frontier through the Réunions policy. Engaged in a serious struggle with the Ottoman Empire, the emperor was again slow to move, and although he joined the Association League against France in 1682 he was glad to make a truce at Regensburg two years later. The whole European position was now bound up with events in England, and the tension lasted until 1688, when William III of Orange won the English crown through the Glorious Revolution and Louis invaded Germany. In May 1689, the Grand Alliance was formed, including the emperor, the kings of England, Spain and Denmark, the Elector of Brandenburg and others, and a fierce struggle against France was waged throughout almost the whole of Western Europe. In general the several campaigns were favourable to the allies, and in September 1697, England, Spain and the United Provinces made peace with France at the Treaty of Rijswijk.

Leopold refused to assent to the treaty, as he considered that his allies had somewhat neglected his interests, but in the following month he came to terms and a number of places were transferred from France to the Holy Roman Empire. The peace with France lasted for about four years and then Europe was involved in the War of the Spanish Succession. The King of Spain, Charles II, was a Habsburg by descent and was related by marriage to the Austrian branch, while a similar tie bound him to the royal house of France. He was feeble and childless, and attempts had been made by the European powers to arrange for a peaceable division of his extensive kingdom. Leopold refused to consent to any partition, and when in November 1700 Charles died, leaving his crown to Philippe, Duke of Anjou, a grandson of Louis XIV, all hopes of a peaceable settlement vanished. Under the guidance of William III a powerful league, a renewed Grand Alliance, was formed against France; of this the emperor was a prominent member, and in 1703 he transferred his claim on the Spanish monarchy to his second son, Archduke Charles. The early course of the war was not favorable to the Imperialists, but the tide of defeat had been rolled back by the great victory of Blenheim before Leopold died on 5 May 1705.