Happily for Alfonso, Sancho, who was still childless, was almost immediately assassinated, creating opportunities for his brothers to return and attempt to reclaim their father's kingdoms.
His passion for his mistress led to her having 10 illegitimate children by him, one of whom, the future Henry II, deposed and executed Alfonso's son and successor, Peter.
In 1366, Peter's conduct led to an uprising by his illegitimate half-brother Henry with support from France and Aragon.
Henry II, the founder of the Trastámara dynasty was installed after victory in the Castilian Civil War.
On Isabella's death, as she was succeeded by their daughter Joanna I and her husband Philip I. Ferdinand, no longer king, then left the Castile and returned to Aragon.
After a long reign Charles abdicated in 1556, dividing his lands between his son Philip II (who inherited the lands of the Crown of Castile (including the Americas), the Crown of Aragon, his Italian territories, and the Netherlands) and his younger brother Ferdinand, who inherited the rest.
In 1580, during a succession crisis in the Kingdom of Portugal when there was no obvious heir to the throne, Philip (a candidate in his own right) invaded and was made king that same year.