During the same time, the former Gujarat Sultan, Muzaffar Shah III escaped to Gujarat from his imprisonment in Agra in 1583. Muzaffar remained for some time in the Rajpipla country, and then came to one Lúna or Lúmbha Káthi, at the village of Khíri in the district of Sardhár in Sorath.  Ítimád Khán Gujaráti was appointed viceroy by Akbar soon in 1583 in place of Shaháb-ud-dín. At this time a party of 700 or 800 Mughals, called Wazír Khánis, separating from Shaháb-ud-dín, remained behind in hope of being entertained by the new viceroy. As Ítimád Khán declared that he was unable to take them into his service, they went off in a body and joined Muzaffar at Khíri, and he with them and three or four thousand Káthi horse marched at once on Áhmedábád. On hearing this Ítimád Khán, leaving his son Sher Khán in Áhmedábád, followed Shaháb-ud-dín to Kadi, and entreated him to return. Shaháb-ud-dín at first affected indifference telling Ítimád that as he had given over charge he had no more interest in the province. After two days, he consented to return if Ítimád stated in writing that the country was on the verge of being lost and that Ítimád being unable to hold it was obliged to relinquish charge to Shaháb-ud-dín. Ítimád Khán made the required statement and Shaháb-ud-dín returned with him. Meanwhile, Muzaffar Sháh reached Áhmedábád, which was weakly defended, and in 1583, after a brief struggle, took possession of the city. While the siege of Áhmedábád was in progress, Shaháb-ud-dín and Ítimád Khán were returning, and were within a few miles of the city, when news of its capture reached them. They continued their advance, but had barely arrived at Áhmedábád when Muzaffar Sháh totally defeated them taking all their baggage.