The Khwarazm state and its rise
In 995, after Ma’mun ibn Muhammad, ruler of Gurganj, captured Kath, the whole of Khwarazm came under one ruler, who now bore the title Khwarazmshah. So the Ma’munids replaced the Afrighid dynasty, and the centre moved to Kunya-Urgench. In 1017 Mahmud of Ghazna conquered Khwarazm, and from 1040 Khwarazm depended on the Seljuks; the descendants of the Seljuk governor Anushtegin, the Anushteginids, ruled it. Qutbiddin Muhammad (1097–1127) revived the title Khwarazmshah, and Atsiz (1127–1156) fought for independence and laid the foundation of a state from the Caspian to the middle Syr Darya. Tekish (1172–1200) took Nishapur, Rayy and Merv in 1187–1193 and defeated the Seljuk sultan Tughril in 1194. His son Alauddin Muhammad (1200–1220) defeated the Kara-Khitai in 1210 and added lands up to Zhetysu. But the rise did not ease the lot of working people: there were uprisings in Otrar in 1210 and in Samarkand in 1212, and provincial governors and court intrigues made the state unstable.
“Family tree”: draw the line Anushtegin → Qutbiddin → Atsiz → Tekish → Muhammad on the board.