The War of the Spanish Succession (1701–14) was a major European conflict of the early 18th century, triggered by the death in 1700 of the infirm and childless Charles II, the last Habsburg King of Spain. Charles II had ruled over a large active empire which spanned the globe, and the question of who would succeed him had long troubled ministers throughout European capitals. Attempts to solve the problem by partitioning (dividing) the empire between 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 Philip, Duke of Anjou, the second grandson of King Louis XIV of France. With Philip ruling in Spain Louis XIV had secured great advantages for his dynasty, but to some statesmen a dominant House of Bourbon was seen as a threat to European stability, and jeopardised the 'Balance of Power'.
Louis XIV had good reasons for accepting his grandson on the Spanish thrones, but he subsequently made a series of controversial moves: he sent troops to secure the Spanish Netherlands, the buffer zone between France and the Dutch Republic; he sought to dominate the Spanish American trade at the expense of English and Dutch merchants; and he refused to remove Philip from the French line of succession, thereby opening the possibility of France and Spain uniting under a single powerful monarch at a future date. To counter Louis XIV's growing dominance England, the Dutch Republic, and Austria – together with their allies in the Holy Roman Empire – reformed the Grand Alliance (1701) and supported Emperor Leopold I's claim to the whole Spanish inheritance for his second son, Archduke Charles. By backing the Habsburg candidate (known to his supporters as King Charles III of Spain) each member of the coalition sought to reduce the power of France, ensure their own territorial and dynastic security, and restore and improve the trade opportunities they had enjoyed under Charles II.
War was formally declared in 1702. By 1708 the Duke of Marlborough and Prince Eugene of Savoy had secured victory in the Spanish Netherlands and Italy, and had defeated Louis XIV's ally, Bavaria. France was facing invasion and ruin, but it was Allied unity which broke first. With the Grand Alliance defeated in Spain, and with its casualties mounting and aims diverging, the Tories came to power in Great Britain in 1710 resolved to end the war. French and British ministers prepared the groundwork for a peace conference and in 1712 Britain ceased combat operations. The Dutch, Austrians, and German states fought on to strengthen their own negotiating position, but defeated by Marshal Villars they were soon compelled to accept Anglo-French mediation. By the terms of the Treaty of Utrecht (1713) and the Treaty of Rastatt (1714) the Spanish empire was partitioned between the major and minor powers. The Austrians received most of Spain's former European realms, but peninsular Spain and Spanish America were retained for the Duke of Anjou where, after renouncing his claim to the French succession, he reigned as King Philip V. The European Balance of Power was assured.