It was not originally the intention of the Mongol Empire to invade the Khwarezmid Empire. According to the Persian historian Juzjani, Genghis Khan had originally sent the ruler of the Khwarezmid Empire, Ala ad-Din Muhammad, a message seeking trade and greeted him as his neighbor: "I am master of the lands of the rising sun while you rule those of the setting sun. Let us conclude a firm treaty of friendship and peace." or he said "I am Khan of the lands of the rising sun while you are sultan those of the setting sun: Let us conclude a firm agreement of friendship and peace"[3] The Mongols' original unification of all "people in felt tents", unifying the nomadic tribes in Mongolia and then the Turcomens and other nomadic peoples, had come with relatively little bloodshed, and almost no material loss. The Mongol wars with the Jurchens however had shown how cruel the Mongols could be. Shah Muhammad reluctantly agreed to this peace treaty, but it was not to last. The war started less than a year later, when a Mongol caravan and its envoys were massacred in the Khwarezmian city of Otrar.

In the ensuing war, lasting less than two years, the Khwarezmid Empire was destroyed.

After the defeat of the Kara-Khitans, Genghis Khan's Mongol Empire gained a border with the Khwarezmid Empire, governed by ShahAla ad-Din Muhammad. The Shah had only recently taken some of the territory under his control, and he was also busy with a dispute with the caliph in Baghdad, An-Nasir. The Shah had refused to make the obligatory homage to the caliph as titular leader of Islam, and demanded recognition as Shah of his empire, without any of the usual bribes or pretenses. This alone had created problems for him along his southern border. It was at this junction the rapidly expanding Mongol Empire made contact.[4] Mongol historians are adamant that the great khan at that time had no intention of invading the Khwarezmid Empire, and was only interested in trade and even a potential alliance.[5]

The Shah was very suspicious of Genghis' desire for a trade agreement, and messages from the Shah's ambassador at Zhongdu (Beijing) in China described the exaggerated savagery of the Mongols when they assaulted the city during their war with the Jin Dynasty.[6] Of further interest is that the caliph of Baghdad had attempted to instigate a war between the Mongols and the Shah some years before the Mongol invasion actually occurred. This attempt at an alliance with Genghis was made because of a dispute between Nasir and the Shah, but the Khan had no interest in alliance with any ruler who claimed ultimate authority, titular or not, and which marked the Caliphate for an extinction which would come from Genghis' grandson, Hulegu. At the time, this attempt by the Caliph involved the Shah's ongoing claim to be named sultan of Khwarezm, something that Nasir had no wish to grant, as the Shah refused to acknowledge his authority, however illusory such authority was. However, it is known that Genghis rejected the notion of war as he was engaged in war with the Jin Dynasty and was gaining much wealth from trading with the Khwarezmid Empire.[citation needed]

Genghis then sent a 500-man caravan of Muslims to establish official trade ties with Khwarezmia. However Inalchuq, the governor of the Khwarezmian city of Otrar, had the members of the caravan that came from Mongolia arrested, claiming that the caravan was a conspiracy against Khwarezmia. It seems unlikely, however, that any members of the trade delegation were spies. Nor does it seem likely that Genghis was trying to provoke a conflict with the Khwarezmid Empire, considering he was still dealing with the Jin in northeastern China.[5]

Genghis Khan then sent a second group of three ambassadors (one Muslim and two Mongols) to meet the shah himself and demand the caravan at Otrar be set free and the governor be handed over for punishment. The shah had both of the Mongols shaved and had the Muslim beheaded before sending them back to Genghis Khan. Muhammad also ordered the personnel of the caravan to be executed. This was seen as a grave affront to the Khan himself, who considered ambassadors "as sacred and inviolable."[7] This led Genghis Khan to attack the Khwarezmian Dynasty. The Mongols crossed the Tien Shan mountains, coming into the Shah's empire in 1219.[8]

After compiling information from many intelligence sources, primarily from spies along the Silk Road, Genghis Khan carefully prepared his army, which was organized differently from his earlier campaigns.[9] The changes had come in adding supporting units to his dreaded cavalry, both heavy and light. While still relying on the traditional advantages of his mobile nomadic cavalry, Genghis incorporated many aspects of warfare from China, particularly in siege warfare. His baggage train included such siege equipment as battering rams, gunpowder, and enormous siege bows capable of throwing 20-foot arrows into siege works. Also, the Mongol intelligence network was formidable. The Mongols never invaded an opponent whose military and economic will and ability to resist had not been thoroughly and completely scouted. For instance, Subutai and Batu Khan spent a year scouting central Europe, before destroying the armies of Hungary and Poland in two separate battles, two days apart.[10]

The size of Genghis's army is often in dispute. Many contemporary Muslim historians claim that the Mongol army was larger, with 400,000 for the Shah (spread across the whole empire) and 600,000–700,000 for the Khan being common figures. 800,000 for Genghis was also thrown around, though with less frequency. However, this figure would exceed the entire Mongol population by many fold, as nomadic populations were not capable of sustaining large populations due to insufficient food production from a lack of agriculture. Modern historians still debate to what degree these numbers reflected reality. David Morgan and Denis Sinor, among others, doubt the numbers are true in either absolute or relative terms, while John Mason Smith sees the numbers as accurate. Sinor credits the Khwarezmians with a total army of 400,000, but puts the Mongol force closer to 100,000–150,000. Near-contemporary sources, such as Rashid Al-Din, state that the Mongols had 105,000 soldiers total in 1206, and 129,000 in 1227.[11]

John France, using a variety of sources and estimation methods, gives the number of 75,000 for the Mongol army, while noting that 40,000 for the Khwarezmian army is possible.[12] Genghis brought along his most able generals to aid him. Genghis also brought a large body of foreigners with him, primarily of Chinese origin. These foreigners were siege experts, bridge-building experts, doctors and a variety of specialty soldiers.

During the invasion of Transoxania in 1219, along with the main Mongol force, Genghis Khan used a Chinese specialist catapult unit in battle; they were used again in 1220 in Transoxania. The Chinese may have used the catapults to hurl gunpowder bombs, since they already had them by this time.[13] While Genghis Khan was conquering Transoxania and Persia, several Chinese who were familiar with gunpowder were serving with Genghis's army.[14] Historians have suggested that the Mongol invasion had brought Chinese gunpowder weapons to Central Asia. One of these was the huochong, a Chinese mortar.[15]

Madrasah Kukaldash (Tashkent)

In this invasion, the Khan first demonstrated the use of indirect attack that would become a hallmark of his later campaigns, and those of his sons and grandsons. The Khan divided his armies, and sent one force solely to find and execute the Shah – so that a ruler of an Empire as large as that of the Khan's, with a larger army, was forced to run for his life in his own country.[4] The divided Mongol forces destroyed the Shah's forces piecemeal, and began the utter devastation of the country which would mark many of their later conquests.

Battle of Vâliyân (1221). Jami' al-tawarikh, Rashid al-Din.

The Shah's army, numbering anywhere from 40,000 to 400,000, was split among the various major cities. The empire had just recently conquered much of its territory, and the Shah was fearful that his army, if placed in one large unit under a single command structure, might possibly be turned against him. Furthermore, the Shah's reports from China indicated that the Mongols were not experts in siege warfare, and experienced problems when attempting to take fortified positions. The Shah's decisions on troop deployment would prove disastrous as the campaign unfolded.

Though tired from their journey, the Mongols still won their first victories against the Khwarezmian army. A Mongol army, under Jochi, with 25,000 to 30,000 men, attacked the Shah's army in southern Khwarezmia and prevented the much larger forces of the Shah from forcing them into the mountains.[16] The primary Mongol army, headed personally by Genghis Khan, reached the city of Otrar in the fall of 1219. After besieging Otrar for five months, the Khan's forces managed to storm the main part of the city by entering a sally port gate that was not secured.[16]

A further month went by before the citadel at Otrar was taken. 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. Genghis killed many of the inhabitants, enslaved the rest, and executed Inalchuq.[17]

Genghis placed his general Jebe at the head of a small army sent to the south, intending to cut off any retreat by the Shah to that half of his kingdom. Further, Genghis and Tolui, at the head of an army of roughly 50,000 men, skirted Samarkand and went westwards to lay siege to the city of Bukhara first. To do this, they traversed 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 surprise attacks in warfare.[18]

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 Turkish soldiers and led by Turkish generals, who attempted to break out on the third day of the siege. The break-out force, of perhaps 20,000 men, was annihilated in open battle. The city leaders opened the gates to the Mongols, though a unit of Turkish defenders held the city's citadel for another twelve days. Survivors from the citadel were executed, artisans and craftsmen 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.[16] Genghis Khan had the people assemble in the main mosque of the town, where he declared that he was the flail of God, sent to punish them for their sins before ordering their execution.[citation needed]

After the fall of Bukhara, Genghis headed to the Khwarezmi capital of Samarkand and arrived in March 1220. Samarkand possessed significantly better fortifications and as many as 100,000 men defending it. 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 a garrison force of 50,000 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 an approximate 2,000 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 that had taken arms against him at Samarkand. The people of Samarkand were ordered to evacuate and assemble in a plain outside the city, where they were killed and pyramids of severed heads raised as the symbol of Mongol victory.[19]

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.[citation needed]

Meanwhile, the wealthy trading city of Urgench was still in the hands of Khwarezmian forces. Previously, the Shah's mother had ruled Urgench, 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 Urgench. 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.

Terken Khatun, Empress of the Khwarazmian Empire, known as "the Queen of the Turks", held captive by Mongol army.

The assault on Urgench 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 defense, 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 Urgench 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, Borte. 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, Borte 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 Borte, whom he would have had to reject had he rejected her child), questions had always existed over Jochi's true parentage.[20]

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 sibling fight by appointing Ögedei the commander of the besieging forces as Urgench 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.[4]

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 Urgench citizens each, which would mean that 1.2 million people were killed. While this is almost certainly an exaggeration, the sacking of Urgench is considered one of the bloodiest massacres in human history.[citation needed]

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

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 rumors 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[21]), 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."[7] 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."[21]

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.[22] 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 city, including the cats and dogs, with Tokuchar's widow presiding over the slaughter.[21] After Nishapur's fall, Herat surrendered without a fight and was spared. Bamian in the Hindukush was another scene of carnage during the 1221 siege of Bamiyan, here stiff resistance resulted in the death of a grandson of Genghis. Next were the cities of Toos and Mashad. 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.[citation needed]

After the Mongol campaign in Khurasan, 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 the spring of 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. The Khan returned northwards, content to leave the Shah in India.

After the remaining centers of resistance were destroyed, Genghis returned to Mongolia, leaving Mongolian garrison troops behind. 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 Eastern Europe.[16] The new territory proved to be an important stepping stone for Mongol armies under the reign of Genghis' son Ögedei to invade Kievan Rus' and Poland, and future campaigns brought Mongol arms to Hungary and the Baltic Sea. For the Islamic world, the destruction of Khwarezmid left Iraq, Turkey and Syria wide open. All three 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 with their own loyal followers. Such sibling rivalry almost came to a head during the siege of Urgench, and Genghis was forced to rely on his third son, Ögedei, to finish the battle. Following the destruction of Urgench, Genghis officially selected Ögedei to be successor, as well as establishing that future Khans would come from direct descendants of previous rulers. Despite this establishment, the four sons would eventually come to blows, and those blows showed the instability of the Khanate that Genghis had created.

Jochi never forgave his father, and essentially withdrew from further Mongol wars, into the north, where he refused to come to his father when he was ordered to.[20] Indeed, at the time of his death, the Khan was contemplating a march on his rebellious son. The bitterness that came from this transmitted to his sons, and especially grandsons, Batu and Berke Khan, (of the Golden Horde) who would conquer Kievan Rus.[10] When the Mamluks of Egypt managed to inflict one of history's more significant defeats on the Mongols at the Battle of Ain Jalut in 1260, Hulegu 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 to aid the cause of Islam, and Mongol battled Mongol for the first time. The seeds of that battle began in the war with Khwarezmia when their fathers struggled for supremacy.[16]

^Kenneth Warren Chase (2003). Firearms: a global history to 1700 (illustrated ed.). Cambridge University Press. p. 58. ISBN0-521-82274-2. Retrieved 2011-11-28. Chinggis Khan organized a unit of Chinese catapult specialists in 1214, and these men formed part of the first Mongol army to invade Transoania in 1219. This was not too early for true firearms, and it was nearly two centuries after catapult-thrown gunpowder bombs had been added to the Chinese arsenal. Chinese siege equipment saw action in Transoxania in 1220 and in the north Caucasus in 1239–40.

^David Nicolle; Richard Hook (1998). The Mongol Warlords: Genghis Khan, Kublai Khan, Hulegu, Tamerlane (illustrated ed.). Brockhampton Press. p. 86. ISBN1-86019-407-9. Retrieved 2011-11-28. Though he was himself a Chinese, he learned his trade from his father, who had accompanied Genghis Khan on his invasion of Muslim Transoxania and Iran. Perhaps the use of gunpowder as a propellant, in other words the invention of true guns, appeared first in the Muslim Middle East, whereas the invention of gunpowder itself was a Chinese achievement