Ala al-Din Muhammad II was Khwarazmshah from 1200 to 1220. In under twenty years he defeated the Ghurids, broke the power of the Qara Khitai, took Samarkand and western Iran, and ruled from the Syr Darya to the Zagros, the largest Muslim state of its day. But his empire rested on an unruly army and powerful enemies, and after his governor at Otrar killed a Mongol trade caravan in 1218 it collapsed within two years under Genghis Khan’s invasion.
| Reigned | 3 August 1200 – December 1220 |
|---|---|
| Father | Tekish, Khwarazmshah 1172–1200 |
| Mother | Terken Khatun, of the Qangli Turks |
| Capitals | Gurganj; Samarkand from about 1212 |
| Key events | Andkhud 1204; Ilamish 1210; Samarkand revolt 1212; march on Baghdad 1217; Otrar incident 1218 |
| Died | Winter 1220–21, on an island in the Caspian Sea |
An inheritance at risk
When Muhammad succeeded his father in 1200 he inherited Khwarazm, Khorasan and part of western Iran, the work described on the page on the Khwarazmian Empire. He also inherited two problems. To the east the Khwarazmshahs still paid tribute to the Qara Khitai, the non-Muslim rulers of the steppe. To the south the Ghurid brothers Ghiyath al-Din and Mu’izz al-Din, rulers of Afghanistan and northern India, wanted Khorasan for themselves.
The war with the Ghurids
The Ghurids attacked at once, taking Nishapur and other cities of Khorasan in the first years of the reign. In 1204 Mu’izz al-Din invaded Khwarazm itself and besieged Gurganj. Muhammad called on his overlords: a Qara Khitai army came to his aid, and in September 1204 the Ghurid army was beaten near Andkhud, in today’s northern Afghanistan. Mu’izz al-Din was murdered in 1206, and the Ghurid state broke up among his commanders. Over the next decade Muhammad took Herat, Ghur and finally Ghazni, absorbing most of what had been the Ghurid lands west of India.

Turning on the Qara Khitai
Having used the Qara Khitai, Muhammad set out to throw them off. He made an alliance with Uthman, the Qarakhanid ruler of Samarkand, and was helped by the turmoil in the Qara Khitai realm, where the Naiman prince Kuchlug, a refugee from Genghis Khan, was taking over the throne. In September 1210, on the Ilamish steppe near the Talas river, the Khwarazmian army defeated the Qara Khitai. Muhammad now took the titles of a world conqueror: chroniclers record him as a “second Alexander”.
The alliance with Samarkand did not last. In 1212 Uthman rebelled and his people massacred the Khwarazmians in the city. Muhammad retook Samarkand, killed Uthman and a large number of its inhabitants, ended the Qarakhanid dynasty and moved his court there. By 1212 the cities of the middle Syr Darya, including Otrar, were also his. For the first time his empire bordered directly on lands that would soon fall to the Mongols.
The quarrel with the caliph
Muhammad inherited his father’s enmity with the caliph al-Nasir, who refused to give him the title of sultan in Baghdad. The quarrel grew bitter. Muhammad accused the caliph of encouraging the Ghurids and the Nizari Ismailis against him, and had religious scholars declare that the Abbasids had no right to the caliphate. He named a sayyid from Tirmidh, a descendant of the Prophet’s family, as anti-caliph.
In 1217, having taken the Jibal from the Eldiguzid atabeg’s governors, he marched on Baghdad with a large army. In the Zagros near Asadabad, west of Hamadan, early snowstorms struck. Men and animals died in great numbers, Kurdish and Turkmen tribes attacked the stragglers, and the shah turned back. Many contemporaries saw the disaster as divine punishment, and the campaign left him with an empty treasury and a damaged reputation in the heartland of Iran.
A fragile empire
Under the surface the state was weak. The army depended on the Qangli and Kipchak Turks, kinsmen of his mother Terken Khatun, who held her own court at Gurganj, issued orders in her own name and forced Muhammad to name a younger son, Uzlagh Shah, as heir instead of the capable Jalal al-Din. Muhammad distrusted many of his commanders, who in turn distrusted him. The newly conquered provinces of Transoxiana, Afghanistan and western Iran had little loyalty to a dynasty that had arrived only recently and often brutally.
First contacts with the Mongols
Muhammad’s eastern frontier now touched the expanding empire of Genghis Khan, who had conquered much of northern China. A Khwarazmian embassy visited Genghis in China, and he replied with an embassy proposing peace and trade, in a letter that the shah reportedly found insulting because it called him the khan’s “son”, a term that could imply subordination. In 1216 or 1219 (the sources differ), while pursuing the Merkits, a Mongol force under Genghis’s son Jochi met Muhammad’s army at the Irghiz river; there was a hard but indecisive fight, and the shah saw for himself the quality of Mongol troops.
Otrar, 1218
In 1218 a large Mongol-sponsored caravan of Muslim merchants, about 450 men by most accounts, reached the frontier town of Otrar. Its governor Inalchuq, a kinsman of Terken Khatun, accused them of being spies, seized their goods and had them killed, apparently with the shah’s approval. When Genghis sent envoys to demand that the governor be handed over, Muhammad had the chief envoy killed and the others humiliated. The incident and its causes are examined on the page on the Otrar incident.
The fall, 1219–1220
Genghis Khan invaded in 1219. Muhammad chose not to meet him in open battle and divided his forces among the cities of Transoxiana, which the Mongols took one at a time. The shah fled west across Iran, pursued by Mongol detachments, and died on an island off the southern Caspian coast near Abaskun in the winter of 1220–21, after naming Jalal al-Din his heir. That story is told on the page on Genghis Khan’s invasion of Iran, and his son’s resistance on the page on Jalal al-Din Mingburnu.
How historians judge him
Our main sources, Juvayni, who served the Mongols, Nasawi, Jalal al-Din’s secretary, and the Arab historian Ibn al-Athir, wrote after the catastrophe and looked for its causes in Muhammad’s character: pride, cruelty and, at the end, panic. Modern historians, following Barthold, put more weight on structure: a new empire built in fifteen years, without loyal provinces, quarrelling with the caliph, held together by a Turkic army that answered to the queen mother. Muhammad was a successful conqueror for most of his reign. His conquests left him facing the strongest army in the world with an empire that had not yet become a state.
Persian words from this page
| علاءالدین محمد | ‘Alâ’ od-Din Mohammad | Ala al-Din Muhammad |
| خوارزمشاه | Khârazmshâh | Khwarazmshah |
| سمرقند | Samarqand | Samarkand |
| اترار | Otrâr | Otrar |
| چنگیز خان | Changiz Khân | Genghis Khan |
| جلالالدین | Jalâl od-Din | Jalal al-Din, his son |
| خلیفه | khalife | caliph |
Sources and further reading
- Ata-Malik Juvayni, Tarikh-i Jahangushay, trans. J. A. Boyle, The History of the World-Conqueror (Manchester, 1958).
- Muhammad al-Nasawi, Sirat al-Sultan Jalal al-Din Mankubirti (biography of Jalal al-Din, with much on his father).
- Ibn al-Athir, al-Kamil fi’l-Tarikh, trans. D. S. Richards, The Chronicle of Ibn al-Athir for the Crusading Period, vol. 3 (Aldershot, 2008).
- W. Barthold, Turkestan down to the Mongol Invasion (English edition London, 1928).
- Michal Biran, The Empire of the Qara Khitai in Eurasian History (Cambridge, 2005).
Want to learn Persian? Get the free Starter Pack
Get the 14-page printable Starter Pack (all 32 letters, a 7-day reading plan, 100 core words and 20 survival phrases) and a short 5-email course. Free.
More in Ghaznavids, Seljuks and Khwarazmshahs (977–1231)
- The Ghaznavid Empire
- Mahmud of Ghazni
- The Rise of the Seljuks
- The Battle of Dandanaqan (1040)
- Tughril Beg Enters Baghdad
- Alp Arslan
- Seljuk Architecture: Tomb Towers and Caravanserais
- The Battle of Manzikert (1071)
- Malik Shah I
- The Seljuks of Kerman
- Nizam al-Mulk and the Siyasatnama
- The Seljuk Domes of Isfahan’s Jameh Mosque
- Omar Khayyam: Poet and Scientist
- Al-Ghazali
- Sana’i of Ghazni
- Hassan-i Sabbah and the Fortress of Alamut
- The Nizari Ismailis and the “Assassins” Legend
- Sultan Sanjar and the Qara Khitai
- The Battle of Qatwan (1141)
- Anvari and Seljuk Court Poetry
- Seljuk Decline and the Atabegs
- The Ghurids
- Attar of Nishapur
- Nizami Ganjavi
- The Khwarazmian Empire
- Ala al-Din Muhammad II
- The Otrar Incident (1218): How Khwarazm Provoked Genghis Khan
- Jalal al-Din Mingburnu