Ghurid dynasty
In 1202, Mu'izz's brother and co-ruler, the Ghurid supreme leader Ghiyath al-Din Muhammad, died of illness, and was succeeded by his Mu'izz as the leader of the Ghurid dynasty. Shortly after Ghiyath's death, however, the Khwarazmian-shah Muhammad II invaded the Ghurid Empire, and besieged Herat. Mu'izz, along with Husain, quickly managed to Muhammad from Herat and then pursued him to Khwarezm, where the Ghurid army besieged the Khwarazmian capital of Gurganj.