Mongol invasion of the Khwarazmian Empire - Wikipedia
The dominant force in late twelfth-century Central Asia was the Qara-Khitai Khanate , which had been founded by Yelü Dashi in the 1130s. Khwarazm and the Qarakhanids were nominally vassals of the Qara-Khitai, but in practice, due to their large population and extent, they were allowed to operate almost autonomously. [ 3 ] : 12 Of these two major vassals, the Qarakhanids were by far the more prestigious; they had ruled in the area for two centuries, and controlled many of the richest cities in the region, such as Bukhara , Samarkand , Tashkent and Fergana . By comparison, Khwarazm had only one major city in Urgench , and had only come to prominence after 1150 under Il-Arslan . [ 3 ] : 13–14 However, as the Seljuk Empire slowly fractured after the death of Ahmad Sanjar in 1154, the Khwarazmids were able to take advantage of the chaos due to their geographical proximity; Il-Arslan's son Tekish captured large cities such as Nishapur and Merv in the nearby region of Khorasan , gaining enough power to declare himself a fully-fledged sovereign in 1189. [ 4 ] : 32–33 Allying with the Abbasid caliph Al-Nasir , he overthrew the last Seljuk emperor, Toghrul III , in 1194, and usurped the sultanate of Hamadan . [ 5 ] Tekish now ruled a great swathe of territory stretching from Hamadan in the west to Nishapur in the east; drawing on his newfound strength, he threatened war with the caliph, who reluctantly accepted him as Sultan of Iran and Khorasan in 1198. [ 4 ] : 44–48 The rapid expansion of what was now the Khwarazmian Empire greatly destabilized the Qara-Khitai, which was nominally the overlord. In the early thirteenth century, the khanate would be destabilized further by refugees fleeing the conquests of Genghis Khan , who had begun to establish hegemony over the Mongol tribes . [ 6 ] Khwarazmian Empire (1190–1220), on the eve of the Mongol conquests Muhammad II became Khwarazmshah after his father Tekish died in 1200. Despite a troubled early start to his reign, which saw conflict with the Ghurids of Afghanistan , he followed his predecessor's expansionist policies by subjugating the Qarakhanids and taking their cities, including Bukhara . [ 7 ] In 1211, Kuchlug , a prince of the Naimans , managed to usurp the Qara-Khitai Empire from his father-in-law Yelü Zhilugu with Muhammad's help, but alienated both his subjects and the Khwarazmshah with anti-Muslim measures. [ 8 ] : 30–31 As a Mongol detachment led by Jebe hunted him down, Kuchlug fled; meanwhile, Muhammad was able to vassalize the territories of Balochistan and Makran , and to gain the allegiance of the Eldiguzids . [ 7 ] Following the defeat of Kuchlug, their shared enemy, relations between the Mongols and the Khwarazmids were initially strong; however, the Shah soon grew apprehensive regarding his new eastern enemy. The chronicler Al-Nasawi attributes this change in attitude to the memory of an unintended earlier encounter with Mongol troops, whose speed and mobility frightened the Shah. [ 9 ]
https://en.m.wikipedia.org/wiki/Mongol_conquest_of_the_Khwarazmian_Empire