he was the grandson of king alfonso the tenth of castile