The matrimonial policy of the monarchs sought advantageous marriages for their five children, forging royal alliances for the long term benefit of Spain. Their first-born, a daughter named Isabella, married Afonso of Portugal, forging important ties between these two neighboring kingdoms that would lead to enduring peace and future alliance. Joanna, their second daughter, married Philip the Handsome, the son of Holy Roman Emperor Maximilian I. This ensured alliance with the Holy Roman Empire, a powerful, far-reaching European territory which assured Spain's future political security. Their only son, John, married Margaret of Austria, seeking to maintain ties with the Habsburg dynasty, on which Spain relied heavily. Their fourth child, Maria, married Manuel I of Portugal, strengthening the link forged by Isabella's elder sister's marriage. Their fifth child, Catherine, married Arthur, Prince of Wales and heir to the throne of England, in 1501; he died at the age of 15 a few months later, and she married his younger brother shortly after he became King Henry VIII of England in 1509. These alliances were not all long lasting, with their only son and heir-apparent John dying young; Catherine was divorced by Henry VIII; and Joanna's husband Philip dying young, with the widowed Joanna deemed mentally unfit to rule.