 As the second son of the king of León and Count of Castile, Alfonso would not have been entitled to inherit the throne.At the end of 1063, probably on 22 December, taking advantage of the fact that numerous magnates had gathered in León, capital of the kingdom, for the consecration of the Basílica of San Isidoro, Ferdinand I summoned a "Curia Regia" to make known his testamentary dispositions, under which he decided to distribute his patrimony among his children, a distribution that would not become effective until the death of the monarch in order to prevent any disputes arising after his death