Joanna, known historically as Joanna the Mad (Spanish: Juana la Loca), was Queen of Castile from 1504, and of Aragon from 1516. Modern Spain evolved from the union of these two crowns. Joanna was married by arrangement to Philip the Handsome, Archduke of the House of Habsburg, on 20 October 1496.
Following the deaths of her brother, Don Juan in 1497, her elder sister Isabella in 1498, and her nephew Miguel in 1500, Joanna became the heir presumptive to the crowns of Castile and Aragon. When her mother Queen Isabella I of Castile died in 1504, Joanna became Queen of Castile, while her father, King Ferdinand II of Aragon, proclaimed himself 'Governor and Administrator of Castile'.
In 1506 Archduke Philip became King of Castile jure uxoris, initiating the rule of the Habsburgs in Spain, and died that same year. Despite being the ruling Queen of Castile, she had little effect on national policy during her reign as she was declared insane and imprisoned in Tordesillas under the orders of her father, who ruled as regent until his death in 1516, when she inherited his kingdom as well. From 1516, when her son Charles I ruled as king, she was nominally co-monarch but remained imprisoned until her death.