In 1679, the 18-year-old Charles II was married to 17-year-old Marie Louise of Orléans (1662–1689), eldest daughter of Philippe I, Duke of Orléans (the only sibling of Louis XIV) and his first wife Henrietta of England. At that time, Marie Louise was known as a lovely young woman. It is likely that Charles was impotent, and no children were born. Marie Louise became deeply depressed and died at 27, ten years after their marriage, leaving the 28-year-old Charles heartbroken.
Still in desperate need of a male heir, the next year he married the 23-year-old Palatine princess Maria Anna of Neuburg, a daughter of Philip William, Elector Palatine, and sister-in-law of his uncle Leopold I, Holy Roman Emperor. However, this marriage was no more successful than the first in producing the much-desired heir.