 Following the death of the king in 1410, however, James was one of the six candidates who claimed the throne.Succession through the male line, as ordained in the will of James I of Aragon, would have given him the crown, but through the Compromise of Caspe, Ferdinand of Antequera was elected instead.Influenced by his mother, Margaret of Montferrat, and by Antón de Luna, James II of Urgell refused to recognise Ferdinand as king and took up arms against him.