Mongol invasion of the Khwarazmian Empire

Between 1219 and 1221, the Mongol forces under Genghis Khan invaded the lands of the Khwarazmian Empire in Central Asia. The campaign, which followed the annexation of the Qara Khitai Khanate, saw widespread devastation and atrocities. The invasion marked the completion of the Mongol conquest of Central Asia, and began the Mongol conquest of Persia.

Both belligerents, although large, had been formed recently: the Khwarazmian dynasty had expanded from their homeland to replace the Seljuk Empire in the late 1100s and early 1200s; nearly simultaneously, Genghis Khan had unified the Mongolic peoples and conquered the Western Xia dynasty. Although relations were initially cordial, Genghis was angered by a series of diplomatic provocations. When a senior Mongol diplomat was executed by Khwarazmshah Muhammed II, the Khan mobilized his forces, estimated to be between 90,000 and 200,000 men, and invaded. The Shah's forces were widely dispersed and probably outnumbered—realizing his disadvantage, he decided to garrison his cities individually to bog the Mongols down. However, through excellent organization and planning, they were able to isolate and conquer the Transoxianan cities of Bukhara, Samarkand, and Gurganj. Genghis and his youngest son Tolui then laid waste to Khorasan, destroying Herat, Nishapur, and Merv, three of the largest cities in the world. Meanwhile, Muhammed II was forced into flight by the Mongol generals Subutai and Jebe; unable to reach any bastions of support, he died destitute on an island in the Caspian Sea. His son and heir Jalal-al Din managed to mobilize substantial forces, defeating a Mongol general at the Battle of Parwan, but these were crushed by Genghis at the Battle of the Indus a few months later.

After clearing up any remaining resistance, Genghis returned to his war against the Jin dynasty in 1223. The war was one of the bloodiest in human history, with total casualties estimated to be between two and fifteen million people. The subjugation of the Khwarazmian lands provided a base for the Mongols' later assaults on Georgia and the rest of Persia; when the empire later divided into separate khanates, the Persian lands formerly ruled by the Khwarazmids would be governed by the Ilkhanate, while the northern cities would be ruled by the Chagatai Khanate. The campaign, which saw the Mongols engage and defeat a non-sinicized state for the first time, was a pivotal moment in the growth of the Mongol Empire.

Background
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. 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.

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 Khorāsān, gaining enough power to declare himself a fully-fledged sovereign in 1189. Allying with the Abbasid caliph Al-Nasir, he overthrew the last Seljuk emperor, Toghrul III, in 1194, and usurped the sultanate of Hamadan. 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. 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.

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. 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. 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.

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. It is also likely that the Shah had grown in pride — like his father, he was now embroiled in a dispute with Al-Nasir, and even went so far as to march on Baghdad with an army, but was repulsed by a blizzard in the Zagros Mountains. Some historians have speculated that the caliph tried to ally with Genghis Khan, especially after Mongol-Khwarazmid relations deteriorated. Mongol historians are adamant that Genghis at that time had no intention of invading the Khwarazmian Empire, and was only interested in trade and even a potential alliance. They cite the fact he was already bogged down in his war against the Jin in China, and that he had to deal with the Hoi-yin Irgen rebellion in Siberia in 1216.

In 1218, the Khan sent a large caravan of Mongol merchants to Khwarazmia; it seems probable that a large proportion of the Mongol elite had invested in the expedition, and thus had a personal interest in its success. However, Inalchuq, the governor of the Khwarazmian city of Otrar, seized the caravan's goods and executed its members on charges of espionage. The validity of the accusations has been debated, as has the Shah's involvement; it is certain, though, that he rejected the Khan's subsequent demands that Inalchuq be punished, going so far as to kill one Mongol envoy and humiliate the other two. This was seen as a grave affront to the Khan himself, who considered ambassadors "as sacred and inviolable" as the Great Khan himself. He abandoned his war against the Jin, leaving only a small army to pursue it, and gathered as many men as possible to invade Khwarazmia.

Opposing forces
The precise sizes of each force have been heavily disputed; the one certainty is that the Mongol army numbered more than the Shah's. The medieval chronicler Rashid al-Din attested that the Mongol army numbered over 600,000 strong, and that they were opposed by 400,000 total Khwarazmians; his contemporary Juzjani gives an even greater estimate of 800,000 for the Khan. These numbers are regarded as greatly inflated by modern historians; the only contemporary source regarded as near-reliable is The Secret History of the Mongols, which gives totals of between 100,000 and 135,000 for the Mongol army, although these totals may have been deflated by a pro-Mongol chronicler.

While Stubbs and Rossabi indicate that the total Mongol invasion force cannot have been more than 200,000, Sverdrup, who hypothesizes that a tumen had often been overestimated in size, gives a minimum figure of 75,000. Most historians have given figures between these two extremes: McLynn estimates the Mongol force at around 120,000; while Smith follows the Secret History with a figure of 130,000. The uncertainty is made worse by the high flexibility and efficiency of the Mongol force's operational structure, allowing it to separate and coalesce at will. As for the Khwarazmians, there is no similarly reliable contemporary source; Sverdrup, taking the proportional exaggeration of the Muslim forces as equal to that of the Mongols, has estimated a total of around 40,000 soldiers, excluding certain town militias. Mclynn however provides a much greater figure of 200,000.

Dispositions
The Khwarazmshah faced many problems. His empire was vast and newly formed, with a still-developing administration. It is known that in 1218 he had overhauled the Seljuk-era administration, replacing it with a streamlined, loyal bureaucracy; the ongoing change may have contributed to disorder during the Mongol invasion. In addition, his mother Terken Khatun still wielded substantial power in the realm; one historian termed the relationship between the Shah and his mother as 'an uneasy diarchy', which often acted to Muhammad's disadvantage.

Additionally, many of the areas that Muhammad charged his troops to defend had been devastated recently by Khwarazmian forces; when later passing through Nishapur, he urged the citizens to repair the fortifications his father had broken down, while Bukhara had been sacked by Muhammed only eight years earlier, in 1212. The Shah also distrusted most of his commanders, with the only exception being his eldest son and heir Jalal al-Din, whose military acumen had been critical on the Irghiz River the previous year. If he had sought open battle, as many of his commanders wished, he would certainly have been greatly outmatched in quantity of troops, let alone quality. The Shah thus made the decision to distribute his forces as garrison troops inside his most important towns, such as Samarkand, Merv and Nishapur.

Genghis' army was commanded by his most able generals, with the exception of Muqali, who was left behind to continue the war against the Jin. Genghis also brought a large body of Chinese siege and construction experts, including several Chinese who were familiar with gunpowder. Historians have suggested that the Mongol invasion had brought Chinese gunpowder weapons, such as the huochong, to Central Asia.

Early movements
The Khwarezm Shah and his advisers assumed that the Mongols would invade through the Dzungarian Gate, the natural mountain pass in between their (now conquered) Khara-Khitai and Khwarezm Empires. One option for the Khwarezm defence was to advance beyond the towns of the Syr Darya and block the Dzungarian Gate with an army, since it would take Genghis many months to gather his army in Mongolia and advance through the pass after winter had passed. A Mongol force under Chagatai and Ogedei soon descended onto Otrar from either the Altai Mountains to the north or the Dzungarian Gate and immediately started laying siege to it. Rashid Al-Din stated that Otrar had a garrison of 20,000 while Juvayni claimed 60,000 (horsemen and militia), though like the army figures given in most medieval chronicles, these numbers should be treated with caution and are probably exaggerated by an order of magnitude considering the size of the city.

Unlike most of the other cities, Otrar did not surrender after little fighting, nor did its governor march its army out into the field to be destroyed by the numerically superior Mongols. Instead the garrison remained on the walls and resisted stubbornly, holding out against many attacks. The siege proceeded for five months without results, until a traitor within the walls (Qaracha) who felt no loyalty to the Shah or Inalchuq opened the gates to the Mongols; the prince's forces managed to storm the now unsecured gate and slaughter the majority of the garrison. The citadel, holding the remaining one-tenth of the garrison, held out for another month and was only taken after heavy Mongol casualties. Inalchuq held out until the end, even climbing to the top of the citadel in the last moments of the siege to throw down tiles at the oncoming Mongols and slay many of them in close quarters combat. Genghis killed many of the inhabitants, enslaved the rest, and executed Inalchuq.

Bukhara
At this point, the Mongol army was divided into five widely separated groups on opposite ends of the enemy Empire. After the Shah did not mount an active defence of the cities on the Syr Darya, Genghis and Tolui, at the head of an army of roughly 50,000 men, skirted the natural defence barrier of the Syr Darya and its fortified cities, and went westwards to lay siege to the city of Bukhara first. To do this, they traversed 300 miles of the seemingly impassable Kyzyl Kum desert by hopping through the various oases, guided most of the way by captured nomads. The Mongols arrived at the gates of Bukhara virtually unnoticed. Many military tacticians regard this surprise entrance to Bukhara as one of the most successful manoeuvres in warfare.

Bukhara was not heavily fortified, with a moat and a single wall, and the citadel typical of Khwarezmi cities. The Bukharan garrison was made up of Turkic soldiers and led by Turkic generals, who attempted to break out on the third day of the siege. Rashid Al-Din and Ibn Al-Athir state that the city had 20,000 defenders, though Carl Sverdrup contends that it only had a tenth of this number. A break-out force was annihilated in open battle. The city's leaders opened the gates to the Mongols, though a unit of Turkic defenders held the city's citadel for another twelve days. The Mongols valued artisans' skills highly and artisans were exempted from massacre during the conquests and instead entered into lifelong service as slaves. Thus, when the citadel was taken survivors were executed with the exception of artisans and craftsmen, who were sent back to Mongolia. Young men who had not fought were drafted into the Mongolian army and the rest of the population was sent into slavery. As the Mongol soldiers looted the city, a fire broke out, razing most of the city to the ground.

Samarkand
After the fall of Bukhara, Genghis headed to the Khwarezmian capital of Samarkand and arrived in March 1220. During this period, the Mongols also waged effective psychological warfare and caused divisions within their foe. The Khan's spies told them of the bitter fighting between the Shah and his mother Terken Khatun, who commanded the allegiance of some of his most senior commanders and his elite Turkish cavalry divisions. Since Mongols and Turks were both steppe peoples, Genghis argued that Terken Khatun and her army should join the Mongols against her treacherous son. Meanwhile, he arranged for deserters to bring letters that said Terken Khatun and some of her generals had allied with the Mongols. This further inflamed the existing divisions in the Khwarezm Empire, and probably prevented the senior commanders from unifying their forces. Genghis then compounded the damage by repeatedly issuing bogus decrees in the name of either Terken Khatun or Shah Mohammed, further tangling up the already divided Khwarezm command structure. As a result of the Mongol strategic initiative, speedy manoeuvres, and psychological strategies, all the Khwarezm generals, including the Queen Mother, kept their forces as a garrison and were defeated in turn.

Samarkand possessed significantly better fortifications and a larger garrison compared to Bukhara. Juvayni and Rashid Al-Din (both writing under Mongol auspices) credit the defenders of the city with 100,000–110,000 men, while Ibn Al-Athir states 50,000. A more likely number is perhaps 10,000, considering the city itself had less than 100,000 people total at the time. As Genghis began his siege, his sons Chaghatai and Ögedei joined him after finishing the reduction of Otrar, and the joint Mongol forces launched an assault on the city. The Mongols attacked using prisoners as body shields. On the third day of fighting, the Samarkand garrison launched a counterattack. Feigning retreat, Genghis drew approximately half of the garrison outside the fortifications of Samarkand and slaughtered them in open combat. Shah Muhammad attempted to relieve the city twice, but was driven back. On the fifth day, all but a handful of soldiers surrendered. The remaining soldiers, die-hard supporters of the Shah, held out in the citadel. After the fortress fell, Genghis reneged on his surrender terms and executed every soldier who had taken arms against him at Samarkand. The people of Samarkand were ordered to evacuate and assemble in a plain outside the city, where many were killed.

About the time of the fall of Samarkand, Genghis Khan charged Subutai and Jebe, two of the Khan's top generals, with hunting down the Shah. The Shah had fled west with some of his most loyal soldiers and his son, Jalal al-Din, to a small island in the Caspian Sea. It was there, in December 1220, that the Shah died. Most scholars attribute his death to pneumonia, but others cite the sudden shock of the loss of his empire.

Gurganj
Meanwhile, the wealthy trading city of Gurganj was still in the hands of Khwarezmian forces. Previously, the Shah's mother had ruled Gurganj, but she fled when she learned her son had absconded to the Caspian Sea. She was captured and sent to Mongolia. Khumar Tegin, one of Muhammad's generals, declared himself Sultan of Gurganj. Jochi, who had been on campaign in the north since the invasion, approached the city from that direction, while Genghis, Ögedei, and Chaghatai attacked from the south. The assault on Gurganj proved to be the most difficult battle of the Mongol invasion. The city was built along the river Amu Darya in a marshy delta area. The soft ground did not lend itself to siege warfare, and there was a lack of large stones for the catapults. The Mongols attacked regardless, and the city fell only after the defenders put up a stout defence, fighting block for block. Mongolian casualties were higher than normal, due to the unaccustomed difficulty of adapting Mongolian tactics to city fighting.

The taking of Gurganj was further complicated by continuing tensions between the Khan and his eldest son, Jochi, who had been promised the city as his prize. Jochi's mother was the same as his three brothers': Genghis Khan's teen bride, and apparent lifelong love, Börte. Only her sons were counted as Genghis's "official" sons and successors, rather than those conceived by the Khan's 500 or so other "wives and consorts". But Jochi had been conceived in controversy; in the early days of the Khan's rise to power, Börte was captured and raped while she was held prisoner. Jochi was born nine months later. While Genghis Khan chose to acknowledge him as his oldest son (primarily due to his love for Börte, whom he would have had to reject had he rejected her child), questions had always existed over Jochi's true parentage.

Such tensions were present as Jochi engaged in negotiations with the defenders, trying to get them to surrender so that as much of the city as possible was undamaged. This angered Chaghatai, and Genghis headed off this fight between siblings by appointing Ögedei the commander of the besieging forces as Gurganj fell. But the removal of Jochi from command, and the sack of a city he considered promised to him, enraged him and estranged him from his father and brothers, and is credited with being a decisive impetus for the later actions of a man who saw his younger brothers promoted over him, despite his own considerable military skills.

As usual, the artisans were sent back to Mongolia, young women and children were given to the Mongol soldiers as slaves, and the rest of the population was massacred. The Persian scholar Juvayni states that 50,000 Mongol soldiers were given the task of executing twenty-four Gurganj citizens each, which would mean that 1.2 million people were killed. While this is almost certainly an exaggeration, the sacking of Gurganj is considered one of the bloodiest massacres in human history.

Then came the complete destruction of the city of Gurganj, south of the Aral Sea. Upon its surrender the Mongols broke the dams and flooded the city, then proceeded to execute the survivors.

Khorasan
As the Mongols battered their way into Urgench, Genghis dispatched his youngest son Tolui, at the head of an army, into the western Khwarezmid province of Khorasan. Khorasan had already felt the strength of Mongol arms. Earlier in the war, the generals Jebe and Subutai had travelled through the province while hunting down the fleeing Shah. However, the region was far from subjugated, many major cities remained free of Mongol rule, and the region was rife with rebellion against the few Mongol forces present in the region, following rumours that the Shah's son Jalal al-Din was gathering an army to fight the Mongols.

Tolui's army consisted of somewhere around 50,000 men, which was composed of a core of Mongol soldiers (some estimates place it at 7,000 ), supplemented by a large body of foreign soldiers, such as Turks and previously conquered peoples in China and Mongolia. The army also included "3,000 machines flinging heavy incendiary arrows, 300 catapults, 700 mangonels to discharge pots filled with naphtha, 4,000 storming-ladders, and 2,500 sacks of earth for filling up moats". Among the first cities to fall was Termez then Balkh.

The major city to fall to Tolui's army was the city of Merv. Juvayni wrote of Merv: "In extent of territory it excelled among the lands of Khorasan, and the bird of peace and security flew over its confines. The number of its chief men rivaled the drops of April rain, and its earth contended with the heavens." The garrison at Merv was only about 12,000 men, and the city was inundated with refugees from eastern Khwarezmia. For six days, Tolui besieged the city, and on the seventh day, he assaulted the city. However, the garrison beat back the assault and launched their own counter-attack against the Mongols. The garrison force was similarly forced back into the city. The next day, the city's governor surrendered the city on Tolui's promise that the lives of the citizens would be spared. As soon as the city was handed over, however, Tolui slaughtered almost every person who surrendered, in a massacre possibly on a greater scale than that at Urgench.

After finishing off Merv, Tolui headed westwards, attacking the cities of Nishapur and Herat. Nishapur fell after only three days; here, Tokuchar, a son-in-law of Genghis was killed in battle, and Tolui put to the sword every living thing in the city, including the cats and dogs, with Tokuchar's widow presiding over the slaughter. After Nishapur's fall, Herat surrendered without a fight and was spared.

Bamiyan in the Hindu Kush was another scene of carnage, where stiff resistance resulted in the death of a grandson of Genghis. Next was the city of Toos. By spring 1221, the province of Khurasan was under complete Mongol rule. Leaving garrison forces behind him, Tolui headed back east to rejoin his father.

Jalal al-Din
After the Mongol campaign in Khorasan, the Shah's army was broken. Jalal al-Din, who took power after his father's death, began assembling the remnants of the Khwarezmid army in the south, in the area of Afghanistan. Genghis had dispatched forces to hunt down the gathering army under Jalal al-Din, and the two sides met in September 1221 at the town of Parwan. The engagement was a humiliating defeat for the Mongol forces. Enraged, Genghis headed south himself, and defeated Jalal al-Din on the Indus River. Jalal al-Din, defeated, fled to India. Genghis spent some time on the southern shore of the Indus searching for the new Shah, but failed to find him.

Genghis sent Dorbei Doqshin with two tumens to pursue al-Din, whom he still regarded as a threat, in early 1222; one account has Doqshin fail to secure al-Din, and return to the Khan in Samarkand, who was so infuriated Doqshin was sent out at once on the same task. Meanwhile, al-Din was quarrelling with local princes, but was mostly victorious when it came to battle. Under Doqshin's leadership, the Mongol army took Nandana from one of the lieutenants of Jalal ad-Din, sacked it, then proceeded to besiege the larger Multan. The Mongol army managed to breach the wall but the city was defended successfully by the Khwarezmians; due to the hot weather, the Mongols were forced to retreat after 42 days. Peter Jackson suggests that Doqshin, having been instructed not to return unsuccessfully, eventually converted to Islam and joined al-Din.

Encouraged by Jalal al-Din's success against the Mongols, the Khwarazmians started an insurgency. Kush Tegin Pahlawan lead a revolt in Merv and seized it successfully. After recapturing Merv, Kush Tegin Pahlawan made a successful attack on Bukhara. People in Herat also rebelled and disposed the Mongol vassal leadership. An insurgency leader named Muhammad the Marghani twice attacked the camp Genghis Khan accommodated at Baghlan and returned with some loot. As a response, Genghis Khan sent a large army Ögedei Khan back to Ghazni. Genghis Khan appointed Yelü Ahai to restore Mongol sovereignty order in Samarqand and Bukhara, Yelu Ahai managed to restore the order in the cities in 1223. Shikhikhutug dealt with the revolt that dethroned the Pro-Mongol governance of Merv.

Aftermath
After the defeat of the Khwarazmian Empire, Genghis Khan gathered his forces in Persia and Armenia to return to the Mongolian steppes. Under the suggestion of Subutai, the Mongol army was split into two forces. Genghis Khan led the main army on a raid through Afghanistan and northern India towards Mongolia, while another 20,000 (two tumen) contingent marched through the Caucasus and into Russia, Armenia and Azerbaijan under generals Jebe and Subutai.

In the following years Jalal al-Din tried to reestablish the Khwarazm kingdom, but never fully consolidated his power. He retook control of areas of western Iran, in Kerman, Tabriz, Isfahan and Fars, but was eventually defeated by the Rum Seljuk Sultan Kayqubad I at the Battle of Yassıçemen in 1230. The Mongols came back to conquer the western areas of the former Khwarazmian Empire in 1230–1231, at the time of Genghis Khan's successor Ögedei, who sent an expedition of three tümen led by general Chormaghun. After attempting a defensive strategy, Jalal al-Din finally died in Diyarbakir in 1231. The Mongols under Chormaghun established themselves in northwestern Iran, from where they were able to raid the neighbouring territories of Armenia, Azerbaijan and Mosul during the next ten years, culminating with the invasion of Georgia in 1236.

The destruction and absorption of the Khwarezmid Empire would prove to be a sign of things to come, for the Islamic world as well as for Eastern Europe. The new territory proved to be an important stepping stone for the Mongol armies when they invaded Kievan Rus' and Poland during the reign of Genghis' son Ögedei, and future campaigns brought Mongol armies to Hungary and the Baltic Sea. For the Islamic world, the destruction of Khwarezmia left Iraq, Turkey and Syria wide open. All three regions were eventually subjugated by future Khans. The war with Khwarezmia also brought up the important question of succession. Genghis was not young when the war began, and he had four sons, all of whom were fierce warriors and each of them had their own loyal group of followers. Their sibling rivalry almost came to a head during the siege of Urgench, and Genghis was forced to rely on his third son, Ögedei, who ended the battle. Following the destruction of Urgench, Genghis officially selected Ögedei to be his successor, and he also ruled that future Khans would be the direct descendants of previous rulers. Despite Genghis's establishment of this practice, the four sons would eventually come to blows, and those blows revealed the instability of the Khanate that Genghis had created.

Jochi never forgave his father, and he essentially withdrew from future Mongol wars, he moved to the north, and he refused to come to his father when he was ordered to. Indeed, at the time of his death, the Khan was contemplating a march on his rebellious son. The bitterness that resulted from this event was transmitted to Jochi's sons, especially Batu and Berke Khan (of the Golden Horde), who would conquer Kievan Rus. When the Mamluks of Egypt managed to inflict one of history's most significant defeats on the Mongols at the Battle of Ain Jalut in 1260, Hulagu Khan, one of Genghis Khan's grandsons by his son Tolui, who had sacked Baghdad in 1258, was unable to avenge that defeat when Berke Khan, his cousin, (who had converted to Islam) attacked him in the Transcaucasus in order to aid the cause of Islam, and Mongol battled Mongol for the first time. The seeds of that battle began in the conflict with Khwarezmia when their fathers struggled for supremacy.