afterwards it was returned to the crown by alfonso the magnanimous