In my research about 14th century Europe, I came across the Wikipedia article for Maria of Portugal, Marchioness of Tortosa, and I came about with an idea that, given the right circumstances/luck, the entire Iberian peninsula could have been united under the House of Barcelona in/as early as the 14th century. Or at least, the groundwork could have been laid out. As for how I came to that...
1. Maria of Portugal was the only sibling of King Ferdinand of Portugal. If Ferdinand dies before their father, Peter, or becomes King but dies without issue, Maria would have been next in line.
2. Maria of Portugal was married in 1354 to Ferdinand, Marquis of Tortosa, half-brother to King Peter IV of Aragon. IOTL, Ferdinand was murdered by his half-brother in 1363, but if he had survived/escaped and had children by Maria, he, or more likely his descendants, would have been contenders for the Aragonese throne, if Peter IV's male line still dies out.
3. Ferdinand of Tortosa was the eldest son of Eleanor, sister and only surviving sibling of King Alfonso XI of Castile. If Peter of Castile dies early, or is still overthrown and Henry of Trastamara is somehow dealt with, Ferdinand and his heirs would have been next in line.
Any thoughts? I know it all sounds nice in theory, but there's probably a dozen things I've missed or ignored.