Following a famine which further spread discontent among the populace, Khalil Sultan was eventually taken captive by the powerful emir Khudaidad Hussain, leader of the Dughlat tribe and a former mentor of the prince. Hussain took Khalil Sultan to Ferghana and had him proclaimed ruler in Andijan. Samarqand, having been left abandoned, was taken unopposed by Shah Rukh. When he later captured Shadi Mulk, Khalil Sultan was forced to go to his uncle in Samarqand and submit to him. The prince had his wife returned to him and was appointed governor of Rayy, but died in 1411, with Shadi Mulk committing suicide soon after.