sentences:  King Ferdinand I subsequently attempted to obtain the annulment of Leonor's first marriage on the grounds of consanguinity, in order to preserve the legitimacy of their daughter, Beatrice of Portugal.The jurist João das Regras claimed, in one of the arguments he made before the courts of Coimbra in 1385 after King Ferdinand I died, that Leonor was not free to marry another man because the needed papal dispensation had been secured (a fact that the king concealed) and her mother's first marriage was therefore valid, meaning Beatrice was illegitimate.The Coimbra courts determined that, since all pretenders to the throne, that is, the sons of Inês de Castro and the master of Aviz, were illegitimate, the dynastic line had been severed and the people, through their representatives, could choose a new king.