The Ghaznavid Empire was a Muslim state founded by Turkic slave soldiers, which at its height in the early eleventh century ruled from eastern Iran and Khwarazm to the plains of northern India. Its capital was Ghazni, in what is now eastern Afghanistan, and its most famous ruler was Mahmud of Ghazni. The dynasty matters for two reasons that pull in opposite directions: its raids carried Muslim power deep into the Indian subcontinent, with great destruction, while its court made Persian the language of government and poetry far beyond Iran.
Slave generals on the Samanid frontier
The Samanid Empire of Bukhara bought Turkic boys from the steppe and trained them as ghulams, slave soldiers bound to their master. Some rose very high. When the Samanid amir Abd al-Malik I died in 961, the army's Turkic commander Alp Tigin backed the losing side in the succession and withdrew south-east to Ghazni, where he pushed aside the local Lawik family in 962. For about fifteen years a series of Turkic commanders held the town, still striking coins in the names of their Samanid masters. The fifth of them, Sabuktigin, a former slave of Alp Tigin's household who had married his daughter, took power in 977 and governed for twenty years. His tomb inscription calls him simply the "most exalted chamberlain", a title that shows how he still presented himself: as a servant of the Samanids, though in practice an independent prince who pushed his frontier towards Kabul and the Indus.
Mahmud, sultan of Ghazni
Mahmud, born in November 971, was Sabuktigin's eldest son, but his father named a younger son, Ismail, as heir. Mahmud defeated his brother and by 998 held the throne. The Abbasid caliph al-Qadir confirmed him and gave him the title Yamin al-Dawla, "right hand of the state", and Mahmud made a show of loyalty to Baghdad and of hostility to the Ismaili Fatimids of Cairo. With the Samanid state collapsing, he divided its lands with the Kara-Khanid ruler, who took everything north of the Oxus while Mahmud kept Khurasan. He then expanded in every direction: parts of the Murghab valley in 1012, Khwarazm in 1017, and overlordship of Sistan, Ghor and Baluchistan. In 1029, a year before his death, he deposed the Buyid prince of Ray, near modern Tehran. He died on 30 April 1030, and his tomb at Ghazni still survives.
Mahmud's Indian campaigns
Between about 1000 and 1027 Mahmud led some seventeen expeditions into northern India. He defeated the Hindu Shahi kings of the Punjab, took Lahore, and raided Nagarkot, Thanesar, Mathura and Kannauj, the capital of the Pratihara dynasty. Temples were rich in gold, jewels and donated treasure, and they were the main targets. The most famous raid set out late in 1025 and reached the temple of Somnath, on the coast of Kathiawar in Gujarat, in January 1026, where the army broke the idol and carried off a huge treasure along with many captives. Despite all this, the only Indian land Mahmud annexed was the Punjab, around 1021. Persian court historians celebrated him as a holy warrior; in modern India, Somnath became a symbol of destruction. Encyclopaedia Iranica's survey of the dynasty argues that the campaigns were driven by plunder and tribute rather than by any plan of mass conversion, and the debate over how to weigh piety against greed continues.
Government, army and court
The Ghaznavid state was Turkic at the top and Persian in its machinery. Military commands went to Turkic officers, many of slave origin, while the vizier, the treasurer and the head of the chancery were Persians who carried on Samanid methods of taxation and record-keeping; no Turk is known to have held those three offices. The army itself mixed Turkic ghulams with Indian troops, Afghans and Arabs, and it used war elephants taken in India. Indian plunder paid for this force and for building at Ghazni and at the palace complex of Lashkari Bazar near Bust in the south-west.
Mahmud also gathered poets and scholars. Unsuri, Farrukhi, Manuchihri and Asadi Tusi wrote verse in his praise. Ferdowsi finished the Shahnameh around 1010 and, by tradition, presented it to Mahmud; a later story says the sultan withheld the 60,000 gold pieces he had promised and the poet answered with a satire. The scholar al-Biruni, brought to Ghazni after the conquest of Khwarazm, travelled with the Indian campaigns, learned Sanskrit and wrote the Kitab al-Hind, a careful study of Indian religion, science and society. The court secretary Bayhaqi wrote a long, vivid history of Masud I's reign, and the historian Utbi also served the court. These works, with the poetry, are the main written sources for the dynasty.
Dandanaqan and the loss of the west
Mahmud's son Masud I set aside his brother Muhammad and took the throne in 1030. He seized Kerman from the Buyids in 1033 but lost it within a year, and his real danger lay in the north. Oghuz Turkmen bands led by the Seljuk family had crossed into Khurasan and were raiding at will. In 1040, at Dandanaqan, in the desert near Merv, they defeated Masud's thirsty and exhausted army. Khurasan and everything further west passed to the Seljuk Empire of Tughril. Masud fled towards India and, in 1041, was deposed and killed by his own troops while crossing the Indus.
The later Ghaznavids in Afghanistan and the Punjab
A troubled generation followed. Masud's son Mawdud ruled for about seven years and pursued his father's killers, and in 1052 a Turkic commander, Toghrul, murdered Sultan Abd al-Rashid and held Ghazni for several months. Stability returned under Ibrahim, who reigned for some forty years from 1059 and accepted peace with the Seljuks on the existing borders. His realm covered eastern Afghanistan, Baluchistan and north-western India. Lahore grew into a second capital of Persian culture: the poet Masud Saad Salman wrote there, and the Sufi Ali Hujwiri, remembered as Data Ganj Bakhsh, composed one of the earliest Persian works on Sufism; his shrine in Lahore is a major place of pilgrimage. The minarets of Masud III and Bahram Shah at Ghazni date from this later period.
Ghurid conquest
The end came from the mountains of Ghor in central Afghanistan. Bahram Shah, who had won the throne in 1117 as a vassal of the Seljuk sultan Sanjar, executed a Ghurid prince in 1149. The prince's brother, Ala al-Din Husayn, took revenge around 1150 to 1151 by sacking and burning Ghazni, earning the name "world burner". Under Khusrau Malik, who came to power about 1160, Oghuz adventurers seized Ghazni and the court moved to Lahore. The Ghurid Muhammad of Ghor took Multan and Peshawar, besieged Lahore, and in 1186 accepted Khusrau Malik's surrender. The deposed sultan was apparently executed a few years later. The Ghurid victories that followed, at the Second Battle of Tarain in 1192, opened the way to the Delhi Sultanate.
On our maps
Our maps show the Ghaznavid Empire on the 1000, 1100 and 1200 maps. Its largest outline, about 1.2 million square kilometres on the 1200 map, is half in today's Afghanistan, with the rest in Turkmenistan, Iran and Pakistan. As the dynasty ended in 1186, that last outline is closer to the Ghurid state that replaced it. Kabul lies inside it on all three maps.
Rulers of the Ghaznavid Empire
- 977–997Sabuktigin
- 997–998Ismail
- 998–1030Mahmud
- 1030Muhammad (first reign)
- 1030–1041Masud I
- 1041Muhammad (second reign)
- 1041–1048Mawdud
- 1048Masud II
- 1048–1049Ali
- 1049–1052Abd al-Rashid
- 1052–1053Toghrul (usurper)
- 1053–1059Farrukh-Zad
- 1059–1099Ibrahim
- 1099–1115Masud III
- 1115–1116Shir-Zad
- 1116–1117Arslan Shah
- 1117–1157Bahram Shah
- 1157–1160Khusrau Shah
- 1160–1186Khusrau Malik
Key dates
- 962 CEAlp Tigin, a Turkic general who has lost a power struggle at the Samanid court, seizes Ghazni.
- 977 CESabuktigin, Alp Tigin's former slave and son-in-law, becomes governor of Ghazni.
- 998 CEMahmud succeeds his father and opens the empire's golden age.
- 1018Mahmud sacks Mathura and captures Kannauj, the Pratihara capital.
- 1026Mahmud's army plunders the temple of Somnath in Kathiawar.
- 1029Mahmud deposes the Buyid ruler of Ray, his last great conquest in the west.
- 1040The Seljuks defeat Masud I at Dandanaqan, and the west of the empire is lost.
- 1059Ibrahim takes the throne and makes a lasting peace with the Seljuks.
- 1117Bahram Shah wins the throne at Ghazni with Seljuk backing.
- 1151The Ghurid ruler Ala al-Din Husayn burns Ghazni for seven days.
- 1163With Ghazni lost, the dynasty makes Lahore its capital.
- 1186Muhammad of Ghor takes Lahore and deposes Khusrau Malik, the last sultan.
From the atlas
Ghaznavid Empire on our maps
Borders of Time draws the Ghaznavid Empire on 3 of its 54 world maps, from 1000 CE to 1200 CE. Its largest extent is on the 1200 CE map, covering about 1,160,000 km² (448,000 sq mi), roughly the size of Egypt today.
On that map it borders the Buyid dynasty, the Kara Khitai Khaganate, the Khwarazmian Empire and the Sultanate of Delhi.
On the map before it appears (900 CE), the same area belongs to the Samanid Empire. On the map after its last appearance (1279 CE), it belongs to Ilkhanate.
- 1000 CE1,160,000 km²
- 1100 CE405,000 km²
- 1200 CE1,160,000 km²
Measured from the historical-basemaps snapshots this atlas uses. Borders in those maps are approximate, especially for early periods.
Quick answers
- When did the Ghaznavid Empire exist?
- From 962 CE to 1187, about 230 years. The atlas draws it on its maps from 1000 to 1200.
- Where was the Ghaznavid Empire?
- At its largest, on the 1200 map, its land lies in today’s Afghanistan (48%), Turkmenistan (23%), Iran (18%) and Pakistan (10%). On that map it borders the Buyid dynasty, the Kara Khitai Khaganate, the Khwarazmian Empire and the Sultanate of Delhi.
- What was the capital of the Ghaznavid Empire?
- Ghazni.
- How big was the Ghaznavid Empire?
- The Ghaznavid Empire was largest on the 1200 map, at about 1,160,000 km² (448,000 sq mi).
- How did slave soldiers come to found a royal dynasty?
- Turkic boys bought on the steppe frontier were trained as ghulams, slave soldiers, for the Samanid army, and the ablest rose to high command. Alp Tigin was one; after a failed coup he withdrew to Ghazni, and Sabuktigin, a slave of his household, later took over there. For decades they still minted coins in the names of their Samanid overlords before Mahmud ruled openly as sultan.
- Why is Mahmud of Ghazni famous?
- Mahmud, sultan from 998 to 1030, led some seventeen expeditions into northern India, sacking cities such as Mathura and plundering the Somnath temple. His rule stretched from Ray and Khwarazm to the Punjab, his raids reached the Ganges, and his court made Ghazni a centre of Persian poetry and learning.
- Were the Ghaznavid raids into India wars of conversion?
- Court writers presented them as holy war, and temples were deliberately destroyed, which is why Somnath became a bitter memory in India. Historians writing for Encyclopaedia Iranica stress that the campaigns aimed above all at plunder and tribute: the only lasting conquest was the Punjab, annexed around 1021, and Indian soldiers served in the sultan's own army.
- What language did the Ghaznavids speak?
- The ruling family and its generals were Turkic, and Turkic was used in the army, but Persian was the language of government, the court and literature. No Turk is recorded as vizier, treasurer or head of the chancery; those posts went to Persian officials trained in the Samanid tradition.
- How did the Ghaznavid Empire end?
- Defeat by the Seljuks at Dandanaqan in 1040 cost the dynasty Iran and Central Asia, leaving it a smaller state in eastern Afghanistan and the Punjab. The Ghurids then took Ghazni and, in 1186, Lahore, where Khusrau Malik surrendered; he was deposed and, it seems, put to death a few years later.