Ahmad Sanjar (1086–1157) was the last of the Great Seljuk sultans to hold real power. He governed Khorasan from Merv for twenty years and then ruled as senior sultan from 1118 to 1157, but his reign was marked by two disasters: his defeat by the Qara Khitai at the Battle of Qatwan in 1141, which lost Transoxiana, and the revolt of the Oghuz nomads in 1153, who captured him and ravaged Khorasan.
| Born | 6 November 1086, Sinjar in northern Mesopotamia |
|---|---|
| Died | 8 May 1157, Merv |
| Father | Malik Shah I |
| Ruled | Khorasan 1097–1118; Great Seljuk sultan 1118–1157 |
| Capital | Merv (today in Turkmenistan) |
| Key battles | Saveh 1119 (victory); Qatwan 1141 (defeat); Oghuz revolt 1153 (defeat and capture) |
King of Khorasan
Sanjar was a child of six when his father Malik Shah died in 1092, and he grew up during the civil wars between his elder brothers Barkyaruq and Muhammad Tapar. In 1097 Barkyaruq made him governor of Khorasan, with his seat at Merv. When the brothers settled their quarrel, Muhammad Tapar ruled the west from Isfahan and Sanjar ruled the east, and the arrangement held until Muhammad’s death.
From Merv, Sanjar built up an eastern power of his own. He forced the Qarakhanid rulers of Samarkand to accept him as overlord, and in 1117 he marched on Ghazna, put his candidate Bahram Shah on the Ghaznavid throne and made the dynasty that had once ruled Khorasan pay him tribute. The Khwarazmshahs, in the delta of the Oxus, were his governors.
Senior sultan, 1118
When Muhammad Tapar died in 1118, his young son Mahmud took the throne in western Iran. Sanjar marched west and defeated his nephew near Saveh in 1119. He did not take western Iran for himself. Instead he confirmed Mahmud as sultan of Iraq and western Iran, under his own authority as the senior sultan, and went back to Merv. For the rest of his reign the Seljuk lands had two centres: the eastern sultanate of Sanjar and a western sultanate held by a series of his nephews, who fought among themselves and with the caliphs of Baghdad. The longer story of that western line is told on the page on Seljuk decline and the atabegs.

The court at Merv
Merv under Sanjar was one of the largest cities in the world, with libraries that still impressed the geographer Yaqut when he worked in them in the early thirteenth century. Sanjar’s court was a centre of Persian poetry. Mu’izzi, his poet laureate, was according to tradition wounded by an arrow from the sultan’s own bow and died of it some years later. Anvari, the master of the panegyric ode, wrote for him, and a famous Persian ode attributed to Anvari, “The Tears of Khorasan”, laments the province’s suffering after the Oghuz invasion. These poets are discussed on the page on Anvari and Seljuk court poetry.
Al-Ghazali taught at Nishapur at the invitation of Sanjar’s vizier, and Sanjar’s relations with the Nizari Ismailis of Alamut were unusually restrained. The Ismaili sources say he was persuaded to make peace after finding a dagger stuck in the floor beside his bed, a story that cannot be checked.
Rebels and rivals
Holding the east together demanded constant campaigns. The most stubborn rival was his own vassal Atsiz, Khwarazmshah from 1127, who rebelled several times; Sanjar invaded Khwarazm in 1138 and again later, but each time Atsiz returned. The rise of that dynasty is told on the page on the Khwarazmian Empire. In the mountains of central Afghanistan the Ghurid prince Ala al-Din Husayn, who had burned Ghazna in 1150, was defeated and captured by Sanjar in 1152, then released.
Qatwan, 1141
The great blow came from the steppe. The Qara Khitai, a people from northern China led by Yelü Dashi, had moved west after the fall of their Liao dynasty and taken over the Qarakhanid lands north of the Syr Darya. When the Qarluq Turks of Samarkand appealed to Sanjar for help against them, he led a large army north. On 9 September 1141, on the steppe of Qatwan near Samarkand, the Qara Khitai routed his army. Sanjar escaped with a handful of men; his wife and many commanders were captured, and all of Transoxiana passed under Qara Khitai overlordship. The battle is described in detail on its own page, the Battle of Qatwan.
News of a defeat of a Muslim sultan by an eastern ruler reached the Crusaders a few years later and was reported in Europe in 1145. It is one of the roots of the legend of Prester John, the Christian king of the East who would come to the aid of the Crusades.
The Oghuz revolt of 1153
Sanjar’s final disaster came from Turks who had once been the Seljuks’ own people. Oghuz tribes grazed their herds around Balkh and paid the sultan’s kitchen a yearly tribute of sheep. In 1153, after quarrels with the officials who collected it, they refused to pay. Sanjar marched against them with a large army and was defeated, and the Oghuz captured him.
For the next three years the old sultan was a prisoner, carried with the nomads and set on a throne by day, while the Oghuz plundered Khorasan. Merv was sacked, and Nishapur was devastated in 1153; its old quarter was left in ruins and the city’s life moved to the suburb of Shadyakh. Sanjar’s officers in Khorasan fought each other rather than rescue him. He escaped in 1156 and returned to Merv, but he died there the next year, in May 1157, at the age of seventy.
The mausoleum and the legacy
He was buried at Merv in a great square tomb of brick crowned by a high dome, which is still the most impressive building of the site. Its double dome, once covered in blue tiles, was celebrated by medieval travellers. The tomb survived the Mongol destruction of Merv in 1221 and has been restored; it is part of the World Heritage site of State Historical and Cultural Park “Ancient Merv” in Turkmenistan.
With Sanjar’s death the Great Seljuk sultanate ended in Khorasan. Its eastern lands fell to Turkish commanders and then to the Khwarazmshahs, while in the west his nephews’ line survived as puppets of their guardians until 1194. Later Persian writers remembered Sanjar as a just and generous king whose old age was a tragedy, an image that owes much to the poets he paid.
Persian words from this page
| سلطان سنجر | Soltân Sanjar | Sultan Sanjar |
| مرو | Marv | Merv |
| خراسان | Khorâsân | Khorasan |
| قطوان | Qatvân | Qatwan |
| غز | Ghozz | the Oghuz (Ghuzz) Turks |
| انوری | Anvari | Anvari, court poet |
Sources and further reading
- Ibn al-Athir, al-Kamil fi’l-Tarikh, trans. D. S. Richards as The Chronicle of Ibn al-Athir for the Crusading Period, vol. 1 (Aldershot, 2006).
- C. E. Bosworth, “The Political and Dynastic History of the Iranian World (A.D. 1000–1217)”, in The Cambridge History of Iran, vol. 5, ed. J. A. Boyle (Cambridge, 1968).
- A. C. S. Peacock, The Great Seljuk Empire (Edinburgh, 2015).
- Michal Biran, The Empire of the Qara Khitai in Eurasian History (Cambridge, 2005).
- UNESCO World Heritage Centre, State Historical and Cultural Park “Ancient Merv”.
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