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 Ghaznavid Empire

The Ghaznavids were a Turkic dynasty, descended from a slave soldier, that ruled from Ghazni in what is now Afghanistan between 977 and 1186. At their height under Mahmud (998–1030) they held Khorasan, much of eastern and central Iran and the Punjab, and although Turkic by origin they ran their state and their court in Persian, carrying on the culture of the Samanids they replaced.

Dates977–1186 (in Khorasan until 1040)
CapitalGhazni; winter residence at Lashkari Bazar near Bust; later Lahore
FounderSebuktigin (r. 977–997)
Greatest rulerMahmud of Ghazni (r. 998–1030)
Court languagePersian (with Arabic for some official use)
EndLahore taken by the Ghurids, 1186
Brick Minaret of Bahram Shah in Ghazni, Afghanistan, with the Minaret of Masud III in the distance
The 12th-century minaret of Bahram Shah at Ghazni, with the minaret of Masud III behind it. Both date from the later Ghaznavid period. Image: AhmadElhan, CC BY-SA 4.0, via Wikimedia Commons.

From slave soldier to dynasty

The Ghaznavids grew out of the army of the Samanid Empire. The Samanids, an Iranian family ruling from Bukhara, bought Turkish boys from the steppe, trained them as cavalry and used them as a professional guard. These ghulams (slave soldiers) could rise high. One of them, Alptigin, became commander of the Samanid army in Khorasan, lost a court struggle in Bukhara and in 962 marched off to Ghazni, a small town on the road between Kabul and Kandahar, where he set himself up as a local ruler.

After Alptigin and a few short-lived successors, the Turkish garrison at Ghazni chose another former ghulam, Sebuktigin, as its leader in 977. He is counted as the real founder of the dynasty. Sebuktigin still recognised the Samanid amir as his overlord, but he raided east against the Hindu Shahi kings of Kabul and the Punjab and helped the weakening Samanids against rebels in Khorasan, which earned him and his son Mahmud a footing there.

Mahmud and the empire at its height

Sebuktigin died in 997 and named his younger son Ismail as heir. Mahmud defeated his brother in 998 and took Ghazni. In 999, as the Qarakhanid Turks took Bukhara and ended the Samanid state (see The End of the Samanids), Mahmud took Khorasan for himself, with the Oxus as the rough border between the two Turkish powers.

The next three decades are the story of Mahmud of Ghazni: repeated campaigns into northern India that brought in enormous plunder, the conquest of Khwarazm in 1017, and in 1029 the capture of Rey from the Buyids. By his death in 1030 the Ghaznavid realm stretched from the Caspian to the Ganges plain, though much of it was held by raiding and tribute rather than by settled administration.

How the state worked

The Ghaznavid state had two halves that did not always fit together. At the top was a Turkish military elite: the sultan, his ghulam guard and his generals, backed by Indian troops and war elephants. Below them was a Persian civil administration, largely inherited from the Samanids, run by secretaries and viziers from Khorasan families who kept the accounts, wrote the letters and collected the taxes.

The army was expensive, and the system depended on a constant flow of revenue. Indian plunder paid for much of it; heavy taxation in Khorasan paid for the rest. That pressure on the Iranian provinces is one reason the Ghaznavids found little local support when the Seljuks arrived.

A Persian court

For readers of Persian, the Ghaznavid court matters more than its battles. Mahmud and his son Masud gathered poets who wrote praise poems (qasidas) in Persian: Unsuri, who held the post of poet laureate, Farrukhi of Sistan and Manuchehri. Their work shaped the classical Persian ode for centuries. The scholar al-Biruni, brought to Ghazni after the conquest of Khwarazm, travelled with the army and wrote his great study of Indian religion and science there (see Al-Biruni).

The finest prose of the age is the history of Abu’l-Fazl Bayhaqi, a secretary in the Ghaznavid chancery who recorded the reign of Masud in close and often unflattering detail: council meetings, intrigues, letters copied word for word. Only part of it survives, but it is one of the great works of early Persian prose and the main source for the dynasty’s collapse in the west. The Shahnameh of Ferdowsi was also completed in Mahmud’s reign and dedicated to him, though the stories about how he received it belong largely to later legend.

Losing Iran

Masud I (r. 1030–1040) inherited the empire and its problems. Oghuz Turkmen bands under the Seljuk family had entered Khorasan, and the Ghaznavid army, built for set-piece battles and Indian campaigns, struggled against mounted nomads who would not stand and fight. After a series of defeats Masud’s army was destroyed at the Battle of Dandanaqan near Merv in 1040. Khorasan and all of Iran were lost. Masud fled toward India and was killed by his own officers in 1041.

The later Ghaznavids

The dynasty survived for nearly 150 more years, now as a power of the Afghan highlands and the Punjab. Sultan Ibrahim (r. 1059–1099) made peace with the Seljuks and ruled for forty years. The minarets of Masud III and Bahram Shah at Ghazni date from this later period, as does the poet Sana’i of Ghazni. From 1117 Bahram Shah held his throne with the support of the Seljuk sultan Sanjar and was in effect a vassal.

The end came from the mountains of Ghor. Around 1150 the Ghurid ruler Ala al-Din Husayn sacked and burned Ghazni, earning the name Jahansuz, “world burner”. The last Ghaznavids moved to Lahore, which the Ghurids took in 1186.

  1. 962 Alptigin seizes Ghazni
  2. 977 Sebuktigin chosen as ruler
  3. 998 Mahmud takes power
  4. 999 Samanid state ends; Mahmud holds Khorasan
  5. 1030 Death of Mahmud; Masud I succeeds
  6. 1040 Defeat at Dandanaqan; Khorasan lost to the Seljuks
  7. c. 1150 Ghazni burned by the Ghurids
  8. 1186 Ghurids take Lahore; end of the dynasty

How historians judge them

The Ghaznavids are remembered in very different ways. In Persian literary history they are patrons of a golden age of court poetry. In much Indian historical writing they are invaders whose raids destroyed temples and cities. Historians such as C. E. Bosworth stress that they were both: a predatory military state and a carrier of Perso-Islamic civilisation. They also set a pattern that lasted for centuries in Iran, in which Turkish soldiers held power and Persian bureaucrats and poets ran the state and its culture. The Seljuks, who drove them out, followed the same model.

Persian words from this page

غزنیGhazniGhazni, the capital
سبکتگینSebokteghinSebuktigin
غلامgholâmslave soldier (literally “boy, servant”)
سلطانsoltânsultan
قصیدهghasidehode, praise poem
بیهقیBeyhaghiBayhaqi, the historian

Sources and further reading

  • Abu’l-Fazl Bayhaqi, The History of Beyhaqi, trans. C. E. Bosworth and Mohsen Ashtiany (Ilex/Harvard, 2011).
  • C. E. Bosworth, The Ghaznavids: Their Empire in Afghanistan and Eastern Iran, 994–1040 (Edinburgh, 1963).
  • C. E. Bosworth, The Later Ghaznavids: Splendour and Decay (Edinburgh, 1977).
  • Encyclopaedia Iranica, “Ghaznavids” (C. E. Bosworth).
  • The Cambridge History of Iran, vol. 4 (1975) and vol. 5 (1968), chapters by C. E. Bosworth.

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