Birth and upbringing
Born on 6 November 1661, Charles was the only surviving son of Philip IV of Spain and his second wife, his niece Mariana of Austria. Marriage within the same extended family was then common among the nobility, but the Spanish and Austrian Habsburgs were unusual in the extent to which they followed this practice. Of eleven marriages contracted by Spanish monarchs between 1450 and 1661, most contained some element of consanguinity, Philip and Mariana being one of two unions between an uncle and his niece. This policy may also have been driven by limpieza de sangre or "blood purity" statutes enacted in the early 16th century, which remained in force until the 1860s.
Intramarriage accentuated the so-called "Habsburg jaw", a physical characteristic common in both Spanish and Austrian Habsburgs. One contemporary reported this was so pronounced in Charles that he swallowed his food without thoroughly chewing, leading to frequent stomach problems. A 2019 study based on an analysis of Habsburg portraits concluded this feature was likely due to a recessive trait, but in the absence of genetic material, such claims remain speculative.
The precise causes of Charles's ill-health remain disputed, especially as neither his elder sister, Margaret, who married her maternal uncle Leopold I, nor their child and his niece María, had similar health issues. Based on contemporary accounts, some modern researchers suggest hydrocephalus derived from a herpetic infection incurred as an infant.
After his birth, he was entrusted to the royal governess Mariana Engracia Álvarez de Toledo Portugal y Alfonso-Pimentel. Under her careful supervision, he survived childhood attacks of measles, chickenpox, rubella and smallpox, any one of which was then potentially fatal. He also had rickets, which left him unable to walk unaided until he was four and required him to wear leg braces until the age of five.
Despite these physical challenges, suggestions that Charles remained largely uneducated into his teens are incorrect. Ramos del Manzano, a legal expert from the University of Salamanca, was appointed his tutor when he was six. From the age of 12, he received lessons in music from Juan del Vado and mathematics from José Zaragoza, a professor at the Colegio Imperial de Madrid.
The extent of his physical and mental disabilities is hard to assess, since little is known for certain, and many claims are either unproven or incorrect. While prone to illness, he was extremely active physically, and contemporaries reported he spent much of his time hunting. One often cited example of his alleged mental incapacity is the period he spent sleeping with his father's disinterred body; this was in fact done under instructions from Mariana, whose doctors advised this would help him produce an heir.
Although reputedly subject to bouts of depression, his participation in government and reports from his council and observers including the French ambassador indicate his mental capacities remained intact. A report from 1691 submitted by an envoy of the Sultan of Morocco, relates that he was received by Charles himself, who played a full part in the discussions. Costanzo Operti, a Savoyard diplomat who attended regular audiences with Charles during the Nine Years' War, described him as affable and generous but shy and lacking self-confidence, characteristics noted by other foreign diplomats.