Go further with Improve your reading skill and discover the art, culture and history of Iran: $14.99, instant PDF download. See inside the book

The Battle of Dandanaqan (1040)

The Battle of Dandanaqan was fought on 23 May 1040 near Merv, in today’s Turkmenistan, between the Ghaznavid sultan Masud I and the Seljuk Turks led by Tughril and Chaghri. The Seljuks destroyed the Ghaznavid army, took Khorasan and opened the way to their conquest of Iran; the Ghaznavids never again ruled west of Herat.

Date23 May 1040 (Ramadan 431 AH)
PlaceDandanaqan, a small walled town in the desert between Merv and Sarakhs
GhaznavidsSultan Masud I; regular army with Indian troops and elephants
SeljuksTughril, Chaghri and their kinsmen; Turkmen horse archers
NumbersUncertain; modern estimates put the Seljuks around 16,000 and the Ghaznavids at several times that, but no reliable figure exists
ResultDecisive Seljuk victory; Khorasan lost by the Ghaznavids

A war of attrition

The battle ended a five-year struggle. Since 1035 the Seljuks, a clan of Oghuz Turkmen herders, had been spreading through Khorasan, taking Merv and then Nishapur (the background is on The Rise of the Seljuks). Masud I, son of Mahmud of Ghazni, had the larger and better-equipped army, but it was built for set battles and Indian sieges: heavy cavalry, infantry, a long baggage train and war elephants.

In 1039 Masud retook Nishapur and spent the winter there, but the Seljuks would not give him the open battle he wanted. They raided his columns, drove off his supplies and moved their families and herds out of reach. The countryside of Khorasan, already squeezed by Ghaznavid taxes and now stripped by both armies, could hardly feed his troops. There was famine in Nishapur that winter.

Brick ruins of the Ghaznavid palace complex at Lashkari Bazar on the Helmand River in southern Afghanistan
Ruins of the Ghaznavid palaces at Lashkari Bazar near Bust, in southern Afghanistan, used as a residence by Masud I. After Dandanaqan the dynasty was pushed back to these eastern lands. Image: Petty Officer 1st Class Gino Flores, U.S. Navy, Public domain, via Wikimedia Commons.

The march to Merv

In spring 1040 Masud decided to strike at Merv, the Seljuk base. The route from Sarakhs ran through dry steppe and desert, and the Turkmen had wrecked or blocked the wells along it. The army marched in the heat of late May with too little water, harried by mounted archers who shot and rode away. Discipline began to break. Arguments among the commanders and resentment among the Turkish guard units appear again and again in the main eyewitness account.

That account comes from Abu’l-Fazl Bayhaqi, a secretary in Masud’s chancery who was with the army. His history describes the campaign day by day: the council meetings, the sultan’s moods and his refusal to take advice, the thirst of the men. It is one of the few medieval Persian battle narratives written by someone who was there, though Bayhaqi, a loyal Ghaznavid official, writing twenty years later, also had reasons to explain the defeat by bad advice and treachery rather than by the sultan’s own mistakes.

The battle

The armies met by the small fort of Dandanaqan, where Masud hoped to find water. The Seljuks attacked a tired and thirsty army that had already lost much of its cohesion. When some units gave way and others went over to the enemy or fled, the Ghaznavid line collapsed. Masud, by Bayhaqi’s account, fought bravely in person, but could only escape with part of his guard. The camp, the baggage and the treasure fell to the Seljuks.

Exact numbers are not known. Medieval figures for the Ghaznavid army run very high and are not trustworthy. Modern historians such as C. E. Bosworth stress that the defeat was less about numbers than about the mismatch between a heavy, supply-bound army and nomad horsemen fighting on ground that suited them.

Proclaiming a new power

The Seljuk leaders held a council on the battlefield. Tughril was set on a throne and acclaimed as ruler of Khorasan, and the family divided the lands to be conquered: Chaghri took Merv and the east, Tughril went west toward Rey and central Iran, and other kinsmen took Herat, Sistan and the marches. They sent a letter announcing the victory to the Abbasid caliph al-Qa’im in Baghdad, presenting themselves as loyal Sunni Muslims and asking for recognition. That diplomatic move pointed the way to Tughril’s entry into Baghdad in 1055 (see Tughril Beg Enters Baghdad).

The end of Masud

Masud returned to Ghazni, decided the city could not be held against the Seljuks and set out for India with his treasure. On the way, at the end of 1040, his own troops mutinied, plundered the treasure and put his brother Muhammad, who had been blinded years before, back on the throne. Masud was imprisoned and killed early in 1041. His son Mawdud avenged him and restored the line, but the later Ghaznavids ruled only from the Afghan highlands and the Punjab (see The Ghaznavid Empire).

  1. 1035 Seljuks defeat a Ghaznavid army near Nasa
  2. 1037–38 Seljuks take Merv and Nishapur
  3. 1039 Masud recovers Nishapur but cannot force a battle
  4. 23 May 1040 Ghaznavid army destroyed at Dandanaqan
  5. 1040–41 Masud deposed by his troops and killed

Why it mattered

Dandanaqan is one of the turning points of Iranian history. It ended Ghaznavid rule in Iran and gave the Seljuks the wealth and towns of Khorasan, from which they conquered the rest of the Iranian plateau within fifteen years. It also began nearly eight centuries in which most rulers of Iran came from Turkic or Turko-Mongol dynasties, while Persian remained the language of government and culture. Within a generation the Seljuks had reached Baghdad and, at Manzikert in 1071, the Byzantine frontier.

Persian words from this page

دندانقانDandânghânDandanaqan
مسعودMas’udMasud
سرخسSarakhsSarakhs
جنگjangbattle, war
چاهchâhwell
خراسانKhorâsânKhorasan

Sources and further reading

  • Abu’l-Fazl Bayhaqi, The History of Beyhaqi, trans. C. E. Bosworth and Mohsen Ashtiany (2011), the eyewitness account.
  • C. E. Bosworth, The Ghaznavids: Their Empire in Afghanistan and Eastern Iran, 994–1040 (Edinburgh, 1963).
  • Andrew Peacock, Early Seljuq History: A New Interpretation (London, 2010).
  • Encyclopaedia Iranica, “Dandanqan” (C. E. Bosworth).
  • The Cambridge History of Iran, vol. 5 (1968).

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.

Become a tutor