The Nine Years' War (1688–97) – often called the War of the Grand Alliance or the War of the League of Augsburg – was a major war of the late 17th century fought between King Louis XIV of France, and a European-wide coalition, the Grand Alliance, led by the Anglo-Dutch Stadtholder-King William III, Holy Roman Emperor Leopold I, King Charles II of Spain, Victor Amadeus II of Savoy, and the major and minor princes of the Holy Roman Empire. The Nine Years' War was fought primarily on mainland Europe and its surrounding waters, but it also encompassed a theatre in Ireland and in Scotland, where William III and James II struggled for control of the British Isles, and a campaign between French and English settlers and their respective Indian allies in colonial North America.
Louis XIV had emerged from the Franco-Dutch War in 1678 as the most powerful monarch in Europe; yet the 'Sun King' remained unsatisfied. Using a combination of aggression, annexation, and quasi-legal means, Louis XIV immediately set about extending his gains to stabilise and strengthen France's frontiers, culminating in the brief War of the Reunions (1683–84). The resulting Truce of Ratisbon guaranteed France's new borders for twenty years, but Louis XIV's subsequent actions – notably his revocation of the Edict of Nantes in 1685 – led to the deterioration of his military and political dominance. Louis XIV's decision to cross the Rhine in September 1688 was designed to extend his influence and pressure the Holy Roman Empire into accepting his territorial and dynastic claims. But when Leopold I and the German princes resolved to resist, and when the States General and William III brought the Dutch and the English into the war against France, the French King at last faced a powerful coalition aimed at curtailing his ambitions.
The main fighting took place around France's borders: in the Spanish Netherlands; the Rhineland; Duchy of Savoy; and Catalonia. The fighting generally favoured Louis XIV's armies, but by 1696 his country was in the grip of an economic crisis. The Maritime Powers (England and the Dutch Republic) were also financially exhausted, and when Savoy defected from the Alliance all parties were keen for a negotiated settlement. By the terms of the Treaty of Ryswick (1697) Louis XIV retained the whole of Alsace, but he was forced to return Lorraine to its ruler and give up any gains on the right bank of the Rhine. Louis XIV also accepted William III as the rightful King of England, while the Dutch acquired their Barrier fortress system in the Spanish Netherlands to help secure their own borders. However, with the ailing and childless Charles II of Spain approaching his end, a new conflict over the inheritance of the Spanish Empire would soon embroil Louis XIV and the Grand Alliance in a final war – the War of the Spanish Succession.