relatives and nobles. Instead, Miran Shah was deposed from his lands and assigned to Timur's own retinue, where he would remain for the next four years. His friends and advisers, among whom were well known figures, were severely punished, with some being executed for the alleged crime of corrupting the prince and leading him astray. War of succession and death Timur had never unambiguously appointed an heir, so at the time of his death in February 1405, a succession dispute erupted among his surviving sons and grandsons. Miran Shah was Timur's eldest living son by this point, but was not considered an active contender to the throne and was passed over in favour of his own son, Khalil Sultan. The latter proclaimed himself emperor at Tashkent soon after his grandfather's death and seized the royal treasury, as well as Timur's imperial capital Samarqand. Sultan Husayn Tayichiud, a maternal grandson of Timur as well as Miran Shah's son-in-law, also made a bid for the throne before aligning himself with Khalil Sultan. Shah Rukh, governor of Herat and Timur's other surviving son, made no offensive move against his nephews at this point. This was likely due to Miran Shah, who posed a serious threat as he, along with his other son Abu Bakr, had led an army out of Azerbaijan in support of Khalil Sultan. However, Miran Shah and Abu Bakr were forced to withdraw prior to being able to do this. Ahmad Jalayir, who had been expelled by Timur fifteen years previously, took advantage of the old emperor's death to recapture his former lands. The two princes drove out Jalayir at Tabriz before being forced to contend with another former enemy: Qara Yusuf, ruler of the Black Sheep Turkomans. In 1406, Qara Yusuf defeated the Timurids at the Battle of Nakhchivan and captured Tabriz. Miran Shah and Abu Bakr attempted to retake the city in the Battle of Sardrud on the 20 April 1408, but were decisively defeated by the joint efforts of the Turkomans and Jalayirids. As a result of this rout, all of Timur's western conquests were lost, with the Timurids being subsequently driven out of western Persia. Though Abu Bakr had managed to escape, Miran Shah was struck down during the battle by a Turkoman chief who, having not recognised the prince, had stripped and looted his body. Qara Yusuf then had his head impaled before the walls