View on Explorer →

Central & East Asia

Ghaznavid Empire

Peak1029 CE
Duration209 yrs
Period977 CE – 1186 CE
CapitalGhazni; later Lahore
FounderSabuktigin
Preceded bySamanid Empire
Succeeded bySeljuk Empire (in the west); Ghurid Sultanate

6 min read · Last reviewed October 2026

At a glance

Rise & Fall

Peak 1029 CE1977: Sabuktigin is chosen as leader of the Turkic garrison at Ghazni2999: Mahmud takes Khurasan and is recognised by the Abbasid caliph31001: Mahmud defeats the Hindu Shahi king Jayapala near Peshawar4c. 1010: Ferdowsi completes the Shahnameh51026: Mahmud sacks the temple of Somnath61040: The Seljuks defeat Mas'ud I at the Battle of Dandanaqan7c. 1150: Ala al-Din Husayn of Ghur sacks and burns Ghazni81186: The Ghurids take Lahore, ending the dynasty977 CE1186 CE
Relative power on the Institute's 0–10 scale (each profile scaled to its own peak). Numbers mark the key events below.
  1. 977Sabuktigin is chosen as leader of the Turkic garrison at Ghazni
  2. 999Mahmud takes Khurasan and is recognised by the Abbasid caliph
  3. 1001Mahmud defeats the Hindu Shahi king Jayapala near Peshawar
  4. c. 1010Ferdowsi completes the Shahnameh
  5. 1026Mahmud sacks the temple of Somnath
  6. 1040The Seljuks defeat Mas'ud I at the Battle of Dandanaqan
  7. c. 1150Ala al-Din Husayn of Ghur sacks and burns Ghazni
  8. 1186The Ghurids take Lahore, ending the dynasty

Foundation

Alp Tegin
Alp TeginVikiçizer, CC BY-SA 4.0

The Ghaznavid state arose from the military household of the Samanid Empire, the Persian dynasty that ruled Khurasan and Transoxiana from Bukhara. In 962 Alp Tegin, a Turkic slave commander who had fallen out with the Samanid court, seized the town of Ghazni in the mountains of eastern Afghanistan. After several short-lived successors, the Turkic garrison chose another former slave soldier, Sabuktigin, as its leader in 977. Ruling nominally as a Samanid governor, Sabuktigin (r. 977–997) extended his power over Bust and the Kabul valley and defeated Jayapala, the Hindu Shahi king, pushing his frontier towards Peshawar. He and his son Mahmud also intervened in the Samanids' civil wars, and in 994 Mahmud received command of the army of Khurasan. After Sabuktigin's death Mahmud overthrew his brother Ismail in 998, and in 999, as the Samanid state collapsed between the Ghaznavids and the Qarakhanids, he made himself master of Khurasan. The Abbasid caliph al-Qadir recognised him with the titles Yamin al-Dawla and Amin al-Milla. Mahmud of Ghazni (r. 998–1030) was among the first Muslim rulers to be widely called sultan, and under him the dynasty, ruling from Ghazni, became the leading power of the eastern Islamic world.

Socioeconomy

Ghazni
GhazniUS State Department (US Embassy in Kabul) a US Government organization, hence PD-USGov applies, Public domain

The Ghaznavid lands were ethnically and religiously diverse. A Turkic military elite ruled over Persian-speaking townspeople and peasants in Khurasan and Afghanistan, Afghan and other hill peoples, and, increasingly, Hindu populations in the Punjab. The state's wealth came from three sources: the land tax of the irrigated oases of Khurasan and Sistan, trade along the routes linking Iran, Central Asia and India, and above all the plunder of Indian temples and cities. Contemporary historians describe great quantities of gold, jewels, captives and elephants brought back to Ghazni after each campaign, and some of this wealth was spent on a great mosque, a madrasa and palaces in the capital. The dynasty were Sunnis of the Hanafi school who presented themselves as champions of the Abbasid caliphate, persecuting Ismailis in Multan and Shi'is and Mu'tazilites at Rayy. Yet the court was thoroughly Persian in culture. Persian was the language of court poetry and much of the administration, and Ghazni drew poets such as Unsuri, Farrukhi and Manuchihri. The heavy taxes needed to pay the army burdened Khurasan, and contemporary sources complain of grasping officials, which helped turn the province against the dynasty when the Seljuks arrived. After 1040 Lahore and the Punjab became increasingly central to the economy and to the life of the dynasty.

Military

Battle of Dandanaqan
Battle of DandanaqanPublic domain

The Ghaznavid army was a professional force paid from the treasury, built around a core of Turkic slave cavalry (ghulams) bound personally to the sultan. Alongside them served Indian troops, including Hindu regiments with their own commanders, as well as Arabs, Kurds, Daylamis and Afghans, and a corps of war elephants taken or bought in India, used in Khurasan as well as on Indian campaigns. Mahmud's expeditions into India, traditionally counted as seventeen between 1001 and 1026, began with the defeat of the Hindu Shahi king Jayapala near Peshawar in 1001. He took the Ismaili-ruled city of Multan in 1006 and again in 1010, defeated Anandapala at Chach in 1008, plundered Nagarkot, Thanesar, Mathura and Kanauj, and in 1025–1026 marched across the Thar desert to sack the temple of Somnath on the Gujarat coast. These were mostly raids for plunder rather than conquests, apart from the annexation of the Punjab. In the west Mahmud defeated the Qarakhanids near Balkh in 1008, annexed Khwarazm in 1017 and took Rayy from the Buyids in 1029. The army's weakness appeared under his son Mas'ud I, whose heavy columns, slowed by baggage and elephants, could not pin down the mobile Seljuk Turkmen horsemen, who finally defeated them at the Battle of Dandanaqan in 1040.

Governance & Law

Ahmad Sanjar
Ahmad SanjarRashid Al-Din, Public domain

Ghaznavid government followed the model of the Samanids and, behind them, the Abbasid caliphate. The sultan was an absolute ruler whose legitimacy rested on military success, on recognition by the caliph in Baghdad and on the display of Sunni orthodoxy. Under him the vizier headed the civil administration, organised in departments (diwans) for finance, for the army and its pay, for correspondence and for the postal and intelligence service, which reported on officials across the empire. Mahmud's viziers included Abu'l-Abbas Fadl Isfarayini and Ahmad ibn Hasan Maymandi, both experienced Persian bureaucrats. Provinces were run by military commanders and civilian officials whose powers were deliberately separated and watched by informers. Court politics were turbulent: on Mahmud's death in 1030 his son Muhammad was proclaimed, but Mas'ud overthrew and blinded him, and in 1032 executed Mahmud's former vizier Hasanak. The detailed history of Mas'ud's reign by the secretary Abu'l-Fazl Bayhaqi depicts a court divided between the old servants of Mahmud and Mas'ud's own men. After 1040 the later Ghaznavids governed a smaller state of eastern Afghanistan and the Punjab with similar institutions; Ibrahim (r. 1059–1099) and Mas'ud III (r. 1099–1115) gave it long, stable reigns, while from 1117 Bahram Shah ruled as a vassal of the Seljuk sultan Sanjar.

Global & Regional Impact

Somnath temple
Somnath templeB. SurajPatro1997, CC BY-SA 4.0

The Ghaznavids had a deep influence on the cultures of Iran, Afghanistan and South Asia. Their court helped make New Persian a language of imperial power far beyond its Iranian homeland. Ferdowsi completed the Shahnameh, the national epic of Iran, around 1010 and presented it to Mahmud, although the story that the sultan rewarded him poorly is a later legend that cannot be verified. The scholar al-Biruni, brought to Ghazni after the conquest of Khwarazm, travelled in the Indian borderlands and wrote his Kitab ta'rikh al-Hind, a study of Indian religion, philosophy and science that is among the most remarkable works of medieval scholarship, and dedicated his astronomical treatise al-Qanun al-Mas'udi to Mas'ud. Bayhaqi's history is a classic of Persian prose, and the poet Sana'i dedicated his Hadiqat al-haqiqa to Bahram Shah. By annexing the Punjab and making Lahore a centre of Persian culture, where the Sufi Ali Hujwiri wrote the Kashf al-mahjub, the Ghaznavids prepared the ground for the Ghurids, the Delhi Sultanate and centuries of Persianate Muslim rule in India. Their raids, above all the sack of Somnath, became central to later memory: Muslim chroniclers celebrated Mahmud as a holy warrior, while in modern India the raids became a symbol of iconoclasm, a contested memory examined by the historian Romila Thapar.

Decline & Fall

Tughril
Tughril1314 artist, Public domain

The Ghaznavid empire was overstretched from the start, and its collapse in the west was rapid. In the 1030s Turkmen tribes led by the Seljuk brothers Tughril and Chaghri crossed the Oxus into Khurasan, where the taxation of Mas'ud's officials had alienated the towns. Nishapur opened its gates to Tughril in 1038, and in May 1040 the Seljuks crushed Mas'ud's exhausted army at the Battle of Dandanaqan near Merv. Mas'ud withdrew towards India, where his own troops deposed him and killed him early in 1041. His son Mawdud avenged him and restored order, but Khurasan and western Iran were lost for good to the new Seljuk Empire. The eastern state survived for almost a century and a half: Ibrahim made peace with the Seljuks around 1059 and the realm remained rich, but in 1117 Sanjar installed Bahram Shah as his vassal. A feud with the rising Ghurid chiefs of central Afghanistan proved fatal. Avenging two brothers put to death by Bahram Shah, Ala al-Din Husayn of Ghur sacked and burned Ghazni in 1150 or 1151, earning the name Jahan-suz, 'world burner'. The Ghaznavids withdrew to Lahore, and Ghazni was later held by Oghuz Turkmen and then, from 1173, by the Ghurids. In 1186 Mu'izz al-Din Muhammad of Ghor took Lahore and imprisoned Khusrau Malik, the last Ghaznavid sultan, ending the dynasty.

The Ghaznavid Empire, founded by Turkic slave soldiers at Ghazni, joined Khurasan, Afghanistan and the Punjab under Mahmud of Ghazni, whose raids opened northern India to Muslim conquest and whose court sheltered Ferdowsi and al-Biruni, before the Seljuks and the Ghurids destroyed it.

References

  • Bosworth, C.E. (1963) The Ghaznavids: Their Empire in Afghanistan and Eastern Iran, 994–1040. Edinburgh: Edinburgh University Press.
  • Bosworth, C.E. (1977) The Later Ghaznavids: Splendour and Decay. The Dynasty in Afghanistan and Northern India, 1040–1186. Edinburgh: Edinburgh University Press.
  • Nazim, M. (1931) The Life and Times of Sultan Mahmud of Ghazna. Cambridge: Cambridge University Press.
  • Thapar, R. (2005) Somanatha: The Many Voices of a History. London: Verso.
  • Wink, A. (1990) Al-Hind: The Making of the Indo-Islamic World. Vol. 1: Early Medieval India and the Expansion of Islam, 7th–11th Centuries. Leiden: Brill.