The War of the Spanish Succession (1702–1714) was a major European conflict of the early 18th century, triggered by the death in 1700 of the last Habsburg King of Spain, the infirm and childless Charles II. Charles II had ruled over a vast global empire, and the question of who would succeed him had long troubled the governments of Europe. Attempts to solve the problem by peacefully partitioning the empire among the eligible candidates from the royal houses of France (Bourbon), Austria (Habsburg), and Bavaria (Wittelsbach) ultimately failed, and on his deathbed Charles II fixed the entire Spanish inheritance on his grandnephew Philip, Duke of Anjou, the second-eldest grandson of King Louis XIV of France. With Philip ruling in Spain, Louis XIV would secure great advantages for his dynasty, but some statesmen regarded a dominant House of Bourbon as a threat to European stability, jeopardising the balance of power.

To counter Louis XIV's growing dominance, England, the Dutch Republic, and Austria - together with their allies in the Holy Roman Empire - re-formed the 1680s Grand Alliance (1701) and supported Emperor Leopold I's claim to the whole Spanish inheritance for his second son, Archduke Charles.

Spain 1702 1714The English, the Dutch and the Austrians formally declared war in May 1702. By 1708, the Duke of Marlborough and Prince Eugene of Savoy had secured victory in the Spanish Netherlands and in Italy, and had defeated Louis XIV's ally Bavaria. But Allied unity broke and the Grand Alliance was defeated in Spain. With casualties mounting and aims of the Alliance diverging, the Tories came to power in Great Britain in 1710 and resolved to end the war, ceasing combat operations in 1712. The Dutch, Austrians, and German states fought on to strengthen their own negotiating position, but defeated by Marshal Villars, they had to accept Anglo-French mediation.

The Treaty of Utrecht (1713) and the Treaty of Rastatt (1714) ended the conflict by partitioning the Spanish empire. The Austrians received most of Spain's former European realms, while the Duke of Anjou retained peninsular Spain and Spanish America, where, after renouncing his claim to the French succession, he reigned (with one brief interlude) as King Philip V until 1746.