 Before dying in 1384, he named his son Zain al-Abidin his successor and his third brother Imad al-Din Ahmad as governor of Kerman.Not satisfied with the arrangement, Shah Yahya advanced against Shiraz, but was expelled from Isfahan by the city's populace and was forced to flee to Yazd.On his deathbed, Shah Shoja wrote a letter to the powerful Turco-Mongol warlord Timur, who was then campaigning in Azerbaijan, in which he gave his sons' loyalty to the conqueror.