page_title: List of heirs to the Spanish throne
section_title: Heirs to Charles II
hierarchical_section_title: List of heirs to the Spanish throne / Heirs to Charles II
caption_attribution_description: Philip V of Spain (19 December 1683 - 9 July 1746), born Philippe de France, fils de France and duc d'Anjou, was king of Spain from 1700 to 1724 and from 1724 to 1746, the first of the Bourbon dynasty in Spain. Philip was the second son of Louis, le Grand Dauphin and Maria Anna of Bavaria,[1] known as Dauphine Victoire. He was a younger brother of Louis, duc de Bourgogne and an uncle of Louis XV of France.
context_page_description: From the personal union of the Crown of Castile and the Crown of Aragon until the accession of the first Bourbon monarch in 1700, the heir to the Spanish throne was the person closest to the Spanish monarch according to the male-preference cognatic primogeniture. From the accession of Philip of France as Philip V until the Pragmatic Sanction of 1830, the heir to the Spanish throne was the person closest to the Spanish monarch according to the Salic law.
  The heir, whether heir apparent or heir presumptive, was often granted the title of Prince of Asturias.
context_section_description: Charles II was four years old when he succeeded his father on the thrones of Spain. The heir presumptive was either his older half-sister, Queen Maria Theresa of France, whose renunciation was considered invalid, or his older sister, Holy Roman Empress Margaret Theresa, who had been designated heir presumptive by Charles's father.
  According to the will of Philip IV and if Maria Theresa's renunciation was valid, the heir presumptive to Charles II at the moment of his accession was his older sister,
  Margaret Theresa. Upon her death in 1673, her daughter,
  Maria Antonia, became heir presumptive to the Spanish thrones according to the will of Philip IV. She died in 1692, leaving her two-month-old son,
  Joseph Ferdinand, Electoral Prince of Bavaria, as heir presumptive. The succession rights of Joseph Ferdinand were advocated by his great-grandmother, Dowager Queen Mariana of Spain. However, he died one year before Charles II.
  Upon the death of Joseph Ferdinand, the line of descent of Holy Roman Empress Margaret Theresa became extinct. Charles II wished to be succeeded by a descendant of his older half-sister, Maria Theresa, who had died after giving birth to Louis, the French Dauphin. However, Charles II wished to avoid personal union between France and Spain. Therefore, he designated the Dauphin's second son,
  Philip, Duke of Anjou, as heir presumptive.
  Upon Charles II's death, his will had named Philip as Frace as heir. However, Holy Roman Emperor Leopold I was the rightful heir according to both Philip IV's will and primogeniture from Philip III. Maria Anna, Leopold's mother, was the only sibling of Philip IV who had children and, unlike her sister Anne and niece Maria Theresa, she had not legally renounced her rights of inheritance over the Spanish throne upon her marriage to Ferdinand III, Holy Roman Emperor. Leopold was not willing to abandon his rights and decided to pursue his claim, sparking the War of the Spanish Succession.
caption: Philip V was recognized as heir presumptive by Charles II.