When King Martin I (the Humanist) of Aragon died in 1410 he had no children to succeed him, and he had not named any successor. The only written law of succession was the Will of James I which confirmed the principle of male primogeniture, but (as we shall see) this was not followed. Six claimants to the throne stepped forward. Through intrigues and political gerrymandering the law of succession was set aside, and a group of nine electors (three from each realm of Aragon, Valencia and Catalonia) was put together to decide upon the respective claims. They met at Caspe in Aragon in 1412, and by the very composition of the group a decision for one of the claimants, Ferdinand of Antequera, was assured in advance. Therefore the event known to history as ”the compromise of Caspe” was not a valid election.
When in 1213, Peter II died on the battlefield of Muret, his son, James I, was only five years old and in the custody of his father’s conqueror. After negotiations the child-king was released and escorted to Catalonia. It was then decided to entrust him to the Templars at Monzón and the regency (procuracio) to his great-uncle, Sanç of Provence. James later recalled that both Sanç and his uncle Ferrado “had the hope of being king”. In the summer of 1214 the cardinal-legate Pierre de Dovai, on behalf of the king, summoned a general cort at Lérida, where all those present were required to swear fealty to the king.
There can be little doubt that these events were remembered by James I when in August 1270 he wrote his third and last will. The testament makes it clear that the throne was to descend in agnatic-cognatic succession, from the male line of his second wife Yolanda, but both the Lords of Xerica and Ayerbe (James and Peter, his sons with his third wife Lady Teresa Gil de Vidaure) were recognized as heirs to the throne, should the male line from Yolante become extinct (as it did). The testament was ratified by the Pope and became the first formal order of succession to the lands of the Crown of Aragon.