Mahmud of Ghazni

From New World Encyclopedia

Mahmud and Ayaz
The Sultan is to the right, shaking the hand of the sheykh, with Ayaz standing behind him. The figure to his right is Shah Abbas I who reigned about 600 years later.
Tehran Museum of Contemporary Art, Tehran

Mahmud of Ghazni (October 2, 971 – April 30, 1030 C.E.), also known as Yamin ad-Dawlah Mahmud (in full: Yamin ad-Dawlah Abd al-Qasim Mahmud Ibn Sebük Tigin), was the ruler of the Ghaznavid Empire from 997 C.E. until his death. Mahmud turned the former provincial city of Ghazni into the wealthy capital of an extensive empire which included modern-day Afghanistan, Pakistan, most of Iran and parts of northwest India. He was also the first ruler to carry the title Sultan. He is remembered as a hero of Islam by some, as a defiler of Hindu, Jain, and Buddhist shrines by others (this legacy may have contributed to the destruction of ancient Buddhist shrines by the taliban in Afghanistan in 2001, although other Muslims opposed this destruction).[1] In any case, in the long run, no believer will be proud of historical attacks or destruction of other people's religion and sacred places. By establishing Muslim rule over a substantial part of the Indian Sub-Continent, he permanently changed the nature of sub-continental politics, religion, and culture. Arguably, the partition of India into the Muslim majority and Hindu majority states of Pakistan and India in 1947, was a consequence of Mahmud of Ghazni's military success.


Mahmud's grandfather was Alptigin, a Turkic slave-guard of the Samanids, in Balkh, who crossed the Hindu Kush mountains to seize Ghazni from the declining Samanid Kingdom, located strategically on the road between Kabul and Kandahar. Alptigin was succeeded in 977 C.E. by his slave and son-in-law Sabuktigin, who enlarged upon Alptigin's conquests, extending his domain north to Balkh, west to Kandahar and Khorasan province, and east to the Indus River. According to Ferishta, Mahmoud's mother was a Persian noble from Zabulistan;[2] although, this information contradicts Ferdowsi's satire of Mahmud for "being descended from slaves on both maternal and paternal side."

Sabuktigin was recognized by the Caliph in Baghdad as governor of his dominions. Sultan Alptigin died in 997 C.E., and was succeeded by his younger son, Sultan Ismail of Ghazni. Mahmud rebelled against his younger brother, Sultan Ismail of Ghazni, and took over the Ghazni as the new Sultan.

Military campaigns

In 994 C.E., Mahmud was engaged with his father, Sabuktigin, in the capture of Khorasan from the rebel Fa'iq in aid of the Samanid Emir Nuh II. During this period, the Samanid state became highly unstable, with shifting internal political tides as various factions vied for control, chief being Abu'l-Qasim Simjuri, Fa'iq, Abu Ali, the General Behtuzun, as well as the neighboring Buyid and Qarakhanids.

Consolidation of rule

Sultan Mahmud's first campaign was against the Qarakhanid Empire in the North to his Empire. After his defeat, he had to enlist the alliance of Seljuk Turks in southern Soghdia and Khwarazm and diplomatically secure his northern border by 998 C.E. In 999 C.E., under the reign of 'Abd al-Malik II, the Samanids engaged in hostilities with Mahmud over Khorasan after political alliances shifted under a new Samanid Emir. These forces were defeated when the Kharakhanids under Nasr Khan invaded them from the North even as Fa'iq died. He then solicited an alliance and cemented it by marrying Nasr Khan's daughter.

The Multan and Hindu Shahi struggles

Mahmud's first campaign to the south was against the Ismaili Fatimid Kingdom at Multan in a bid to curry political favor and recognition with the Abbassid Caliphate engaged with the Fatimids elsewhere. Raja Jayapala of the Hindu Shahi Dynasty of Gandhara at this point attempted to gain retribution, for an earlier military defeats at the hands of Ghazni under Mehmud's father in the late 980s, that had lost him extensive territory, and is defeated once more. His son, Anandapala, succeeded him and continued the struggle, assembling a powerful confederacy which was defeated once more at Lahore, in 1008, bringing him control of the Hindu Shahi dominions of Updhanpura.[3]

There is considerable evidence from writings of Al-Biruni, Soghidan, and Uyghur and Manichean texts that the Buddhists, Hindus, and Jains were accepted as People of the Book and references to Buddha as Burxan or as a prophet can be found. After the initial destruction and pillage Buddhists, Jains and Hindus were granted protected subject status as dhimmis.[4]

Indian campaigns

Following the defeat of the Rajput Confederacy, Mahmud then decided to teach them all a lesson for combining against him and soon found out that they were rich and that the temples were great repositories of wealth; he then set out regular expeditions against them, leaving the conquered kingdoms in the hands of Hindu vassals, annexing only the Punjab region. He was also on record for having vowed to raid Hind every year.

Mahmud had already had relationships with the leadership in Balkh through marriage, its local Emir Abu Nasr Mohammad, offered his services to the Sultan and his daughter to Mahmud's son, Muhammad. After Nasr’s death, Mahmud brought Balkh under his leadership. This alliance greatly helped him during his expeditions into Northern India.

The Indian kingdoms of Nagarkot, Thanesar, Kannauj, Gwalior, and Ujjain were all conquered and left in the hands of Hindu, Jain, and Buddhist Kings as vassal states and he was pragmatic enough not to shirk making alliances and enlisting local peoples into his armies at all ranks.

The later invasions of Mahmud were specifically directed to temple towns as Indian temples were depositories of great wealth, in cash, golden idols, diamonds, and jewelery; Nagarkot, Thanesar, Mathura, Kanauj, Kalinjar, and Somnath. Mahmud's armies routinely stripped the temples of their wealth and then destroyed them; Varanasi, Ujjain, Maheshwar, Jwalamukhi, and Dwarka.


It is also noted that Ghazni reveled in being renowned as an iconoclast. He is also frequently criticized for his desecration of temples and has been called a bloodthirsty tyrant and robber as well as being accused of persecution for the nature of his expeditions, in the Indian sub-continent, which were marked by a large baggage train of slaves as plunder and has led to the accusation that he attempted to convert non-Muslims by force. Holt and Lewis state that "he shed no blood except in the exigencies of war," and was tolerant in dealings with his own Hindu subjects, some of whom rose to high posts in his administration, such as his Hindu General Tilak. However, there is little proof to authenticate or corroborate these stories.

Political challenges and his death

The last four years of Mahmud's life were spent contending with the influx of Oghuz Turkic horse tribes from Central Asia, the Buyid Dynasty, and rebellions by Seljuqs.

Sultan Mahmud died on April 30, 1030. His mausoleum is located at Ghazni (in modern Afghanistan).[5]

Campaign timeline

As a Prince

  • 994: Gained the title of Saif-ud-dawla and became Governor of Khorasan under service to Nuh II of the Samanids in civil strife
  • 995: The Samanid rebels Fa'iq (leader of a court faction that had defeated Alptigins nomination for Emir) and Abu Ali expel Mahmud from Nishapur. Mahmud and Sabuktigin defeat Samanid rebels at Tus.

As a Ruler

  • 997: Qarakhanid Empire
  • 999: Khurasan, Balkh, Herat, Marv from the Samanids. A concurrent invasion from the North by the Qarakhanids under Elik Khan (Nasr Khan) ends Samanid rule.
  • 1000: Seistan
  • 1001: Gandhara: Sultan Mahmud defeats Jayapala at Peshawar and Jayapala defects and commits suicide.
  • 1002: Seistan: Imprisoned Khuluf
  • 1004: Bhatia annexed after it fails to pay its yearly tribute.
  • 1005: Multan revolts under Abul-Futtah Dawood who enlists the aid of Anandapala. Defeated at Peshawar and pursued to Sodra (Wazirabad). Ghur captured. Appoints Sewakpal to administer the region. Anandapala flees to Kashmir, takes refuge in the Lohara fort in the hills on the western border of Kashmir.
  • 1005: Defends Balkh and Khurasan against Nasr I of the Qarakhanids and recaptured Nishapur from Isma'il Muntasir of the Samanids.
  • 1005: Sewakpal rebels and is defeated.
  • 1008: Mahmud defeats the Rajput Confederacy (Ujjain, Gwalior, Kalinjar, Kannauj, Delhi, and Ajmer) in battle between Und and Peshawar, and captures the Shahi treasury at Kangra in the Punjab Hill States.
Note: A historical narrative states in this battle, under the onslaught of the Gakhar tribe Mahmud's army was about to retreat when Jayapala's son King Anandpala's elephant took flight and turned the tide of the battle.
  • 1008: Nagarkot
  • 1010: Ghur: Against Mohammad ibn Sur
  • 1010: Multan revolts. Abul Fatha Dawood imprisoned for life at Ghazni.
  • 1011: Thanesar
  • 1012: Joor-jistan: Captures Sar-Abu-Nasr
  • 1012: Demands and receives remainder of the province of Khurasan from the Abassid Caliph. Then demands Samarkand as well but is rebuffed.
  • 1013: Bulnat: Defeats Trilochanpala.
  • 1015: Ghaznis expedition to Kashmir fails. Fails to take the Lohara fort at Lokote in the hills leading up to the valley from the west.
  • 1015: Khwarezm: Marries his sister to Aboul Abbass Mamun of Khwarezm who dies in the same year in a rebellion. Moves to quell the rebellion and installs a new ruler and annexes a portion.
  • 1017: Kannauj, Meerut, and Muhavun on the Jamuna, Mathura and various other regions along the route. While moving through Kashmir he levies troops from vassal Prince for his onward march, Kannauj and Meerut submitted without battle.
  • 1021: Kalinjar attacks Kannauj: He marches to their aid and finds the last Shahi King Trilochanpala encamped as well. No battle, the opponents leave their baggage trains and withdraw the field. Also fails to take the fort of Lokote again. Takes Lahore on his return, Shahi flee to Ajmer. First Muslim governors appointed east of the Indus River.
  • 1023: Lahore, Kalinjar, Gwalior: No battles, exacts tribute. Trilochanpala the grandson of Jayapala who is assassinated by his own troops and official annexation of Punjab by Ghazni. Also fails to take the Lohara fort on the western border of Kashmir for the second time.
  • 1024: Ajmer, Nehrwala, Kathiawar: This raid was his last major campaign. The concentration of wealth at Somnath was renowned, and consequently it became an attractive target for Mahmud, and had previously deterred most invaders. The temple and citadel were sacked, and most of its defenders massacred; Mahmud personally hammered the temple's gilded lingam to pieces and the stone fragments were carted back to Ghazni, where they were incorporated into the steps of the city's new Jamiah Masjid (Friday mosque) in 1026. He placed a new King in Gujarat as a tributary and took the old one to Ghazni prisoner. His return detoured across the Thar Desert to avoid the armies of Ajmer and other allies on his return.
  • 1025: Marched against the Jats of the Jood mountains, who harried his army on its return from the sack of Somnath.
  • 1027: Rayy, Isfahan, Hamadan from the Buyid (Daylami) Dynasty.
  • 1028, 1029: Merv, Nishapur lost to Seljuk Turks

Mahmud's campaigns seem to have been motivated by religious zeal against both the Fatimids Shiites and non-Muslims: Buddhists, Jains, and Hindus. His principal drive remained the Shiites, Buyid Iran, as well as favor and recognition of independence from the Abbassid Caliphate. The wealth plundered from the Rajput Confederacy and his Indian campaigns went a long way towards meeting those ends. By 1027, Mahmud had accomplished this as well as capturing most of Pakistan and North Western India as well as obtaining formal recognition of Ghazni's sovereignty from the Abbasid Khalifah, al-Qadir Billah, as well as the title of Yameen ud Daula.

Regional attitudes towards Mahmud's memory

In Afghanistan, Mahmud is celebrated as a national hero and a great patron of the arts, architecture, and literature, as well as a vanguard of Islam and a paragon of virtue and piety.

In modern Pakistan, he is hailed as a conquering hero who established the standard of Islam upon heathen land, while in India, he may be depicted as a raiding iconoclastic invader, bent upon the loot and plunder of a peaceful Hindu population. Conversion to Islam of the native population has also become a controversial topic with the versions of sword enforced mass conversions vs. inspirational missionary activity. Over the past century, with the rise of Hindutva and the partition of India, a lot more attention has been focused on casualties, temple destructions, slavery, and forced conversions to Islam than before. This controversy has been further stoked by the depictions of the historical Mahmud as either a hero or a villain by the polarization of nationalist or ideological orientations.

Iranians remember him as an Orthodox Sunni who was responsible for the revival of the Persian culture by commissioning and appointing Persians to high offices in his administration as ministers, viziers and generals. In addition Iranians remember him for the promotion and preference of Persian language instead of Turkish and patronage of great nationalist poets and scholars such as Ferdowsi, Al-Biruni, and Ferishta as well as his Lion and Sun flag which is still a national symbol in the modern state of Iran.

Relationship with Ayaz

It is related that Mahmud fell in love with a young male slave by the name of Ayaz. The love he bore his favorite, and the latter's devotion, became a staple of Islamic lore, emblematic of ideal love affairs. The Sultan, in later love poetry was transformed into a symbol of "a slave to his slave."[6] Ayaz became the paragon of the ideal beloved, and a model of purity in Sufi literature.

In 1021, the Sultan raised Ayaz to kingship, awarding him the throne of Lahore. The poet Sa'adi was among those celebrating the two.[7] "Under the Turkish Ghaznavid, Seljuk, and Khawarazmshah rulers of Iran in the eleventh and twelfth centuries, pederasty was quite common in courtly circles."[8]


Under his reign, the region broke away cleanly from the Samanid sphere of influence and hastened their end. While he nominally acknowledged the Abbassids as Caliph as a matter of form, he was also granted the title Sultan as recognition of his independence.

By the end of his reign, the Ghaznavid Empire extended from Kurdistan in the west to Samarkand in the northeast, and from the Caspian Sea to the Yamuna. Although his raids carried his forces across Indian sub-continent, only the Punjab and Sindh, modern Pakistan, came under his permanent rule; Kashmir, the Doab, Rajasthan, and Gujarat remained under the control of the local vassal Rajput dynasties.

The wealth brought back to Ghazni was enormous, and contemporary historians (for example, Abolfazl Beyhaghi, Ferdowsi) give glowing descriptions of the magnificence of the capital, as well as of the conqueror's munificent support of literature. He transformed Ghazni the first center of Persian literature into one of the leading cities of Central Asia, patronizing scholars, establishing colleges, laying out gardens, and building mosques, palaces, and caravansaries. He patronized Ferdowsi to write the Shahnameh, and after his expedition across the Gangetic Plains in 1017, of Al-Biruni to compose his Tarikh Al-Hind in order to understand the Indians and their beliefs.

On April 30, 1030, Sultan Mahmud died in Ghazni, at the age of 59 years. Sultan Mahmud had contracted malaria during his last invasion. The medical complication from malaria had caused lethal tuberculosis. He had been a gifted military commander, and during his rule, universities were founded to study various subjects such as mathematics, religion, the humanities, and medicine. Islam was the main religion of his kingdom and Hanafi school thought was favored. The Perso-Afghan dialect Dari was made the official language.

The Ghaznavid Empire was ruled by his successors for 157 years, but after Mahmud it never reached anything like the same splendor and power. The expanding Seljuk Turkish empire absorbed most of the Ghaznavid west. The Ghorids captured Ghazni c. 1150, and Muhammad Ghori captured the last Ghaznavid stronghold at Lahore in 1187. The Ghaznavids went on to live as the Nasher-Khans in their home of Ghazni until the twentieth century.

  • Pakistan today has named one of its medium-range missiles in honor of him.
Preceded by:
Ismail of Ghazni
Ghaznavid Ruler
Followed by:


  1. Islamic Activists, Statement Against Taliban Destruction of Buddhist Shrines. Retrieved April 18, 2007.
  2. Ferishta, History Of The Mohamedan Power In India, p. 27.
  3. Peter Malcolm Holt and Bernard Lewis, The Cambridge History of Islam (Cambridge: Cambridge University Press, 1977). ISBN 0-521-29137-2
  4. Alexander Berzin, The Historical Interaction between the Buddhist and Islamic Cultures before the Mongol Empire, The Berzhin Archives. Retrieved April 24, 2007.
  5. Nancy Hatch Dupree, Sultan Mahmud's Mausoleum in Ghazni, Afghanistan, An Historical Guide to Afghanistan. Retrieved April 4, 2007.
  6. Encyclopædia Britannica Online, Islamic arts Influence of Mahmud of Ghazna.
  7. Sir Edwin Arnold, With Sa'di in the Garden. Retrieved April 18, 2007.
  8., Middle East literature—Persian. Retrieved April 18, 2007.

ISBN links support NWE through referral fees

This article incorporates text from the Encyclopædia Britannica Eleventh Edition, a publication now in the public domain.

External links

All links retrieved November 5, 2022.


New World Encyclopedia writers and editors rewrote and completed the Wikipedia article in accordance with New World Encyclopedia standards. This article abides by terms of the Creative Commons CC-by-sa 3.0 License (CC-by-sa), which may be used and disseminated with proper attribution. Credit is due under the terms of this license that can reference both the New World Encyclopedia contributors and the selfless volunteer contributors of the Wikimedia Foundation. To cite this article click here for a list of acceptable citing formats.The history of earlier contributions by wikipedians is accessible to researchers here:

The history of this article since it was imported to New World Encyclopedia:

Note: Some restrictions may apply to use of individual images which are separately licensed.