 However, the Ghurids shortly managed to inflict a heavy defeat on the two empires, and then used the opportunity to conquer Marv, Sarakhs, Nasa, Abiward, Tus, and Nishapur.Several Ghurid princes were shortly appointed as the governor of the cities, which included a nephew of Baha al-Din's grandfather Fakhr al-Din Masud, Taj al-Din Zangi.In 1202, Ghiyath al-Din Muhammad died of illness, and was succeeded by his brother Mu'izz al-Din Muhammad as the head of the Ghurid dynasty.