Khwarazmian dynasty
After the death of Mu'izz al-Din Muhammad in 1206, Ala al-Din Ali was dismissed by the new Sultan Ghiyath al-Din Mahmud, who had him imprisoned in a fortress in Gharchistan. Ala al-Din Ali, however, was later freed by the ghulam Tajuddin Yildoz, who crowned him as the Sultan of the Ghurid dynasty. After a year Tajuddin Yildoz was forced to surrender Firuzkuh to the Khwarazmian dynasty, and Ala al-Din Ali was captured by a Khwarazmian army and was brought to Khwarazm, where he lived in an honorable exile in Khwarazm. Ala al-Din Ali died a few years later.