Judaism traditionally teaches that the Messiah will be a direct descendant of King David, and Christians trace the lineage of Jesus back to him.
King David, of blessed memory, was a great sage and recognized transmigrations.