Origin of the War of Spanish Succession
King Charles II of Spain was an invalid from a very young age, and it was clear that he would never produce an heir. The issue of who would rule the Spanish kingdoms after his death became quite contentious. Through his mother Maria Theresa of Spain, an older sister of Charles II, the Dauphin, only legitimate son of Louis XIV, was the most direct heir, but he was a problematic choice: as the heir to the French throne, if he gained both crowns, it would amount to an annexation of Spain and her vast colonial empire by France, at a time when France was already powerful enough to threaten the European balance of power.
The alternative candidates were Emperor Leopold I, a first cousin of the late king and Electoral Prince Joseph Ferdinand of Bavaria. The former presented similarly formidable problems, for Leopold’s success would have reunited the powerful Spanish-Austrian Habsburg empire of the 16th century. Although Leopold and Louis were both willing to defer their claims to a younger line of their family - Leopold to his younger son Archduke Charles and Louis to the Dauphin’s younger son, the Duc d’Anjou, the Bavarian prince remained a less threatening candidate. As a result, Joseph Ferdinand was the favored choice of England and the Netherlands.
The War of the Grand Alliance, with essentially the same groupings of countries fighting over different issues, had come to an end just as the Spanish succession was becoming critical. War exhaustion led England and France to agree on the First Partition Treaty, which designated Joseph Ferdinand as heir, in return for which the Dauphin and Archduke Charles received territory in Italy.
Joseph Ferdinand died abruptly the next year, which led to the Second Partition Treaty. Under the terms of that agreement, Charles was to become heir, but the Italian territories that had been parcelled out amongst the two men would now go entirely to France. While France, The Netherlands, and England were all happy with the new arrangement, Austria was not and vied for the entire Spanish inheritance. While the wrangling continued, Charles II unexpectedly spoke out and bequeathed his empire to Anjou, thus keeping the two thrones separate. Louis backed out of the treaty, his grandson was crowned King as Philip V, and the remaining interested parties acquiesced with misgivings.
Unfortunately, Louis overplayed his hand. He threatened a mercantilist policy in the Spanish/French dominions (thus cutting England and Holland off from Spanish trade) and recognized Philip as his heir, passing over the Dauphin and the Dauphin’s eldest son. In 1701, following the death of James II of England, a pensioner at Louis’ court, Louis recognized his son, James Francis Edward Stuart, the “Old Pretender", as King of England, Scotland, and Ireland, thus alienating the English. The war began slowly, with Austrian forces under Prince Eugene of Savoy invading the Spanish territories in Italy. France soon intervened, which in turn brought in England, Holland and most of the German states. Minor powers Bavaria, Portugal, and (perversely) Savoy sided with France and Spain.