As King Charles II of Spain had been both mentally and physically infirm from a very young age, it was clear that he could not produce an heir. Thus, the issue of the inheritance of the Spanish kingdoms — which included not only Spain, but also dominions in Italy, the Low Countries, and the Americas — became quite contentious. Two dynasties claimed the Spanish throne: the French Bourbons and the Austrian Habsburgs; both royal families were closely related to the late King of Spain.
The most direct and legitimate successor would have been Louis, le Grand Dauphin, the only legitimate son of King Louis XIV of France and Spanish princess Maria Theresa, herself King Charles II's elder half-sister. In addition, Louis XIV was a first cousin of his wife Maria Theresa and of King Charles II as his mother was Spanish princess Anne of Austria, the sister of King Philip IV, Charles II's father. The Dauphin, being next in the French line of succession as well, was a problematic choice: had he inherited both the French and the Spanish realms, he would have control of a vast empire that would have threatened the European balance of power. Furthermore, both Anne and Maria Theresa had renounced their rights to the Spanish succession upon their marriages. In the latter case, however, the renunciation was widely seen as invalid, since it had been predicated upon Spain's payment of the Infanta's dowry, which was never paid.
Charles II was the last Habsburg King of Spain. After his death, the War of the Spanish Succession broke out as France and Austria vied for the Spanish Empire.
Charles II was the last Habsburg King of Spain. After his death, the War of the Spanish Succession broke out as France and Austria vied for the Spanish Empire.
The alternative candidate was the Holy Roman Emperor, Leopold I, of the Austrian Habsburg dynasty. He was a first cousin of the King of Spain, his mother having been another sister of Philip IV; moreover, Charles II's father, Philip IV, had given the succession to the Austrian line in his will. This candidate, too, posed formidable problems, for Leopold's success would have reunited the powerful Spanish-Austrian Habsburg empire of the sixteenth century. In 1668, only three years after Charles II had ascended, the then-childless Leopold had agreed to the partition of the Spanish territories between the Bourbons and the Habsburgs, even though Philip IV's will entitled him to the entire inheritance. In 1689, however, when William III of England required the Emperor's aid in the War of the Grand Alliance against France, he promised to support the Emperor's claim to the undivided Spanish empire.
A new candidate for the Spanish throne, the Electoral Prince Joseph Ferdinand of Bavaria, had been born in 1692. Joseph Ferdinand was Leopold I's grandson, but in the female line, so he belonged not to the Habsburg but to the Wittelsbach dynasty. His mother, Maria Antonia, had been Leopold's daughter by his first marriage, to Philip IV of Spain's younger daughter Margaret Theresa. As Joseph Ferdinand was neither a Bourbon nor a Habsburg, the likelihood of Spain merging with either France or Austria remained low. Although Leopold and Louis were both willing to defer their claims to a junior line of the family — Leopold to his younger son, the Archduke Charles, and Louis to the Dauphin's younger son, the duc d'Anjou — the Bavarian prince remained a far less threatening candidate. Accordingly, he soon became the preferred choice of England and the Netherlands. Joseph Ferdinand, moreover, would have been the lawful heir to the Spanish throne under Philip IV's will.
As the War of the Grand Alliance came to a close in 1697, the issue of the Spanish succession was becoming critical. England and France, exhausted by the conflict, agreed to the First Partition Treaty, which named Joseph Ferdinand heir to the Spanish throne, but divided Spanish territory in Italy and the Low Countries between France and Austria. This decision was taken without consulting the Spanish, who vehemently objected to the dismemberment of their empire. Thus, when the Partition Treaty became known in 1698, Charles II of Spain agreed to name the Bavarian Prince his heir, but assigned to him the whole Spanish Empire, not just the parts England and France had chosen.
The young Bavarian prince abruptly died of smallpox in 1699, reopening the issue of the Spanish succession. England and France soon ratified the Second Partition Treaty, assigning the Spanish throne to the Archduke Charles. The Italian territories would go to France, while the Archduke would receive the remainder of the Spanish empire. The Austrians, who were not party to the treaty, were displeased, for they openly vied for the whole of Spain, and it was the Italian territories in which they were most interested: richer, closer, and more governable. In Spain, distaste for the treaty was even greater; the courtiers were unified in opposing partition, but were divided on whether the throne should go to a Habsburg or a Bourbon. The pro-French statesmen, however, were in the majority, and in October 1700, Charles II agreed to bequeath all of his territory to the Dauphin's second son, the duc d'Anjou. Charles took steps to prevent the union of France and Spain; should Anjou have inherited the French throne, Spain would have gone to his younger brother, the duc de Berri. After Anjou and his brother, the Archduke Charles was to have been next in the line of succession.