But , unfortunately , Babur , could not have enjoyed it for long . When his son Humayun fell ill , Babur prayed to God to spare his son at the cost of his life . After Babar fell seriously ill , Humayun was told of a plot by the senior nobles of Babur 's court to bypass the leader 's sons and appoint Mahdi Khwaja , Babur 's sister 's husband , as his successor .