Seljuks and Beyliks · 1037 – 1500

The Battle of Dandanaqan 1040: Birth of the Seljuk State

In 1040 the Seljuks defeated the Ghaznavid sultan Mesud I at Dandanaqan, a desert town on the Merv–Serakhs route in today's Turkmenistan. The victory ended Ghaznavid rule in Khorasan and led the Seljuk beys to proclaim Tughril Beg their first sultan.

7 min read7 sourcesPublished: 29 October 2026Last checked: 29 October 2026
Köküne Kadar TV editorial teamOur sourcing policy
The Battle of Dandanaqan 1040: Birth of the Seljuk State
Seljuk Empire correct locator map.png

On 23 May 1040, two armies met in the sands of the Karakum Desert. One was a Ghaznavid army led by a sultan. The other was a Seljuk force led by two brothers. By the end, the Ghaznavids had lost Khorasan and the Seljuks had a state. This article explains how the battle unfolded, where it happened and why it still matters.

The Battle of Dandanaqan (1040) in Brief

The Battle of Dandanaqan was fought in 1040 between the Seljuks and the Ghaznavids. The Seljuks won.

Encyclopaedia Iranica dates the decisive victory to 8 Ramadan 431, which is 23 May 1040. The TDV Islamic Encyclopedia says the open battle in front of Dandanaqan fortress lasted three days.

The Seljuk forces were led by Tughril Beg and Chaghri Beg. The Ghaznavid army was led by Sultan Mesud I.

The result went well beyond one battlefield. The victory ended Ghaznavid rule in Khorasan and opened the region to Seljuk rule.

Battle of Dandanaqan Map: Where Was It?

Dandanaqan lay in what is now Turkmenistan. It stood inside the Karakum Desert, on the route between Merv and Serakhs.

Medieval geographers described it as a town administratively tied to Merv. They put it 10 farsakhs from Merv.

If you try to find it on a modern map, look for the desert stretch between those two names. Do not expect a bustling city. Dandanaqan was a small town in sandy country, and that setting shaped the whole fight.

An excavation report by B. Zahoder, published in the journal Belleten of the Turkish Historical Society, describes the ruins. Walls, gypsum columns and old objects lie in the Karakum sands. According to the report, a military unit found them by chance.

The Road to Dandanaqan

The Seljuks did not arrive at Dandanaqan as underdogs with no record. They had beaten the Ghaznavids in 1035 and again in 1038. The TDV Islamic Encyclopedia says these wins shook the Ghaznavid position in Khorasan.

Then came a setback. In June 1039, at the clash of Talhab, the Seljuks could not hold against the Ghaznavid army. They pulled back into the surrounding deserts.

Before the 1040 campaign, the Seljuk leaders talked about what to do next. One proposal was to withdraw to western Iran. Chaghri Beg opposed it. He argued that the fight should happen in Khorasan.

That choice put the battle on ground the Seljuks could use. The desert was not empty space to them. It was a weapon.

How the Seljuks Wore Down Sultan Mesud

The Ghaznavid sultan marched toward Merv with a large, heavily armed army. It also included war elephants. On open ground that looks like an advantage. In a desert it can become a burden.

The Seljuks avoided a head-on clash on the march. Their cavalry struck and withdrew, again and again. English Wikipedia describes these hit-and-run attacks as wearing the Ghaznavid army down. They also cut its supply links.

Then came water. The TDV Islamic Encyclopedia says Seljuk units made the wells along the route unusable. That worsened the thirst of the Ghaznavid army as it moved toward Merv.

Encyclopaedia Iranica adds another layer. Famine and drought in the region seriously reduced the fighting capacity of Mesud’s heavily armed army.

Think of a long road trip with a car full of luggage, no fuel stops and no cold drinks. You may have the biggest vehicle on the road. You still arrive tired and thirsty. Mesud’s army was in a harsher version of that situation.

Who Led What, and How Many Fought?

The two sides were not evenly matched on paper, and the numbers are disputed.

Encyclopaedia Iranica puts the Seljuk Turkmens who fought at Dandanaqan at about 16,000.

The Ghaznavid side is harder to pin down. The TDV Islamic Encyclopedia reports that Mesud set out from Nishapur for the 1040 campaign with an army of 100,000. That is a claim about the campaign force. English Wikipedia collects other estimates and gives Ghaznavid forces as 16,000 to 50,000.

So treat 100,000 as a figure for the expedition, not as a count of men in the final fight. The sources differ, and the honest answer is a range.

What Happened After the Victory

After the defeat, Sultan Mesud escaped from the battlefield with 100 horsemen, according to the TDV Islamic Encyclopedia.

The political result was larger. Ghaznavid rule in Khorasan was over. The region now stood open to Seljuk rule.

After the victory, the Seljuk beys proclaimed Tughril Beg the first sultan of the new state. That is why historians treat Dandanaqan as the turning point that created the Great Seljuk State.

The territory was also divided. UNESCO’s History of Civilizations of Central Asia says Khorasan went to Chaghri Beg, with Merv as his centre.

The Ghaznavids did not vanish. UNESCO notes that after Mesud, Mevdud restored Ghaznavid power at least in eastern Afghanistan.

Timeline

  • 1035: The Seljuks win a victory over the Ghaznavids.
  • 1038: A new Seljuk victory shakes the Ghaznavid position in Khorasan.
  • June 1039: After the clash of Talhab, the Seljuks withdraw into the deserts.
  • 23 May 1040: The Seljuks win at Dandanaqan, according to Encyclopaedia Iranica’s dating.
  • 1040, after the victory: Tughril Beg is proclaimed ruler, and a victory letter is sent to the Abbasid caliph.
  • 1040, after the victory: Merv becomes the administrative centre of Chaghri Beg in Khorasan.

Details You Won’t Find in Guidebooks

The arrow-and-bow seal. The victory letter sent to the Abbasid caliph al-Qa’im bi-Amr Allah carried the Turks’ bow-and-arrow symbol. It shows how the new rulers chose to present themselves.

The famous picture is not from 1040. The battle scene used on Turkish Wikipedia was not made in 1040. It comes from a copy of the Tarikh-i Abu’l-Khair Khani, written in Samarkand in 1543. So it shows how a later age imagined the fight.

An eyewitness on the losing side. Beyhaqi, the Ghaznavid secretary and historian, personally took part in Mesud’s campaign that ended in the Dandanaqan defeat.

A mosque mihrab in a museum. Dandanaqan once had a mosque. Gypsum fragments from its mihrab, calculated to have stood about 3 metres high, survive. They date to the second half of the 11th century. They are held by the State Museum of the Turkmenistan State Cultural Center in Ashgabat, according to the Metropolitan Museum of Art’s Court & Cosmos exhibition list.

Why It Matters for Travelers and Students

If you travel along the old Silk Road routes of Central Asia, Dandanaqan shows how geography decided history. The battle was not won by size. It was won by cavalry that knew the terrain, by control of water, and by a leader who chose to fight in Khorasan.

If you study the Seljuks, this is the starting point. Before 1040 they were a force raiding and fighting around Khorasan. After it they had a sultan, a core territory and a capital region around Merv.

When you read later chapters about the Seljuks, you will know where the state began. It began in the desert between Merv and Serakhs, in a small town whose ruins still lie in the sand.

FAQ

When was the Battle of Dandanaqan fought?

Encyclopaedia Iranica places the decisive Seljuk victory on 8 Ramadan 431, which is 23 May 1040. The open battle in front of Dandanaqan fortress lasted three days, according to the TDV Islamic Encyclopedia.

Who fought at Dandanaqan?

The Seljuks were led by Tughril Beg and Chaghri Beg. The Ghaznavid army was led by Sultan Mesud I.

Where is Dandanaqan today?

It lay in what is now Turkmenistan, inside the Karakum Desert on the route between Merv and Serakhs. Medieval geographers described it as a town 10 farsakhs from Merv and administratively tied to Merv.

Why did the Seljuks win?

Seljuk horsemen wore down the Ghaznavid army with hit-and-run attacks, cut its supply lines and spoiled wells along the route. Famine and drought in the region also reduced the fighting power of Mesud’s heavily armed army.

What happened after the battle?

Ghaznavid rule in Khorasan ended and the region opened to Seljuk rule. The Seljuk beys proclaimed Tughril Beg the first sultan of the new state, and Chaghri Beg received Khorasan with Merv as his centre.

Sources

  1. Turkish Wikipedia — Dandanakan Muharebesi tr.wikipedia.org
  2. Encyclopaedia Iranica — DANDĀNQĀN iranicaonline.org
  3. TDV İslâm Ansiklopedisi — Ali Sevim, Dandanakan Savaşı islamansiklopedisi.org.tr
  4. English Wikipedia — Battle of Dandanaqan en.wikipedia.org
  5. UNESCO — History of Civilizations of Central Asia, vol. IV, part 1 unesdoc.unesco.org
  6. Türk Tarih Kurumu Belleten — B. Zahoder, Dendanekan belleten.gov.tr
  7. The Metropolitan Museum of Art — Court & Cosmos annotated exhibition list libmma.contentdm.oclc.org

Image: Seljuk Empire correct locator map.png — MapMaster 2008 first version, Nihil scimus 2025 update., Public domain

This article was prepared with the help of AI. Every statement was checked against the sources, and no sentence without a source was published. If you spot an error, please write to us. Our sourcing policy · Write to us →

Related articles