Carlos II, King of Spain from 1665-1700, and the last of the Spanish Habsburg dynasty, was the son of Philip IV [1605-1665] and Maria Anna [1634-1696], daughter of Kind Ferdinand III of Hungary. Ascending to the throne at the age of four, Carlos' first decade of rule was a regency under the queen mother. During this time the government was concerned with combatting the ambitions of the French King Louis XIV. The last years of Carlos' reign were dominated by the question over his succession. Married twice, first to Marie Louise d'Orleans and second to Maria Anna of Neuburg, the King was unable to father children. Ultimately he named as his sole heir the Bourbon prince Philip of Anjou, the second of Louis XIV grandsons. This lead to the War of the Spanish Succession and to the dismembering of Spain's European possessions.