The austere Felipe IV inherited the combined thrones of Spain, together with Portugal, Sicily, Naples, and a vast colonial empire on the 31st of March, 1621. He was just sixteen. He proved to be an ineffectual ruler, whose reign saw the loss of Portugal (with its vast colonial empire), Jamaica, Cerdagne, Roussilon, Artois and other parts of the Netherlands. At times he came close to losing even his native crown of Castille. His military incompetence also saw the loss of Moyenvic and Bar, the remaining possessions of his sole ally the Duke of Lorraine.
At the age of ten he had married Elizabeth of France, as part of a double marriage alliance with the Bourbons. She gave him seven children, but only one son - the Infante Baltasar Carlos. Of the six girls, only one (Maria Theresa), survived infancy.
Élisabeth's death in 1644 freed the King up to marry once more. The premature death of the Infante Baltasar Carlos at the age of sixteen in 1646, and the deaths of the King's brothers Carlos and Ferdinand in 1632 and 1642, impressed upon him the urgency of securing the royal succession. He opted for Baltasar's intended bride, the Archduchess Maria Anna of Austria. The new Queen Mariana, who was only twelve when they first became engaged, was also his niece. She dutifully set about providing him with the desired heirs: Margarita Teresa (born 1651), Maria Ambrosia (who did not long survive birth in 1655), the hoped-for male heir, Felipe Prospero, in 1657, and another son, Ferdinand Thomas, in 1658. Though this last prince did not make it to his first birthday, yet another pregnancy allowed the King enough lee-way to consent to his eldest daughter's match with his French nephew as part of the disastrous peace of 1660, on the proviso she renounce for herself and her heirs any claim to the Spanish throne.
Unfortunately, the succession was proving every bit as precarious as the King had feared. This fifth pregnancy proved to be the Queen's last; she expired shortly after the birth of a pudgy but sickly Infante [1]. Baptized Charles Eugene Felix, he was sickly and deformed, with herpes-like rashes on his face and atrophic genitalia [2]. His elder brother the Prince of Asturias was, comparatively, perfectly formed, but given to epileptic seizures and bouts of illness. As, if seemed likely, the two princes perished early or without heirs, the King determined to settle the succession on his younger daughter Margarita. She was promptly affianced, succession rights intact, to her uncle the Emperor Leopold.
The matter of the King's remarriage was immediately brought up. A healthy young bride of sufficient rank was sought for him in the four corners of Christendom. The fourteen year old Louisa Maria of the Palatinate was given some consideration, being favoured by both Paris and Vienna. Though destitute, she was the cousin of the Empress-Dowager Eleanora Gonzaga and of the Duke of Mantua, a loyal ally of the Empire; she also the niece of the Queen of Poland, of the Elector Palatine and of the Electress of Hanover. The Duke Alfonso IV of Modena had two sisters, Leonora and Maria, in their late teens, but the Spanish sovereign had little wish to ally himself to so loyal a servant of France. A far richer and more prestigious union presented itself in the thirteen year old Françoise Madeleine d'Orléans, a princess of the blood royal of France and cousin of King Louis XIV. She was also the niece of Charles IV, Duke of Lorraine, who avidly promoted the union, seeing in it the surest means of recovering his patrimony. The Emperor also put forward his younger sisters, the Archduchesses Eleonora Maria and Maria Anna Josepha, though these were yet children and the half-sisters of Felipe's previous queen. Alternatively, he suggested a cousin, Archduchess Claudia Felicitas of Austria, or her sister Maria Magdalena, though both were still children also.