Portugal voluntarily entered a dynastic union between 1580 and 1640. This occurred because the last two kings of the House of Aviz – King Sebastian, who died in the battle of Alcácer Quibir in Morocco, and his great-uncle and successor, King-Cardinal Henry of Portugal – both died without heirs, resulting in the Portuguese succession crisis of 1580.