# Mahmud of Ghazni

Abu al-Qasim Mahmud ibn Sabuktigin (Persian: ابوالقاسم محمود بن سبکتگین, romanized: Abu al-Qāṣim Maḥmūd ibn Sabuktigīn; 2 November 971 – 30 April 1030), usually known as Mahmud of Ghazni or Mahmud Ghaznavi (محمود غزنوی), was Sultan of the Ghaznavid Empire, ruling from 998 to 1030. During his reign and in medieval sources, he is usually known by his honorific title Yamin al-Dawla (یمین‌ الدوله, lit. 'Right Hand of the State'). At the time of his death, his kingdom had been transformed into an extensive military empire, which extended from northwestern Iran proper to the Punjab in the Indian subcontinent, Khwarazm in Transoxiana, and Makran.
Highly Persianized, Mahmud continued the bureaucratic, political, and cultural customs of his predecessors, the Samanids. He established the ground for a future Persianate state in Punjab, particularly centered on Lahore, a city he conquered. His capital of Ghazni evolved into a significant cultural, commercial, and intellectual centre in the Islamic world, almost rivalling the important city of Baghdad. The capital appealed to many prominent figures, such as al-Biruni and Ferdowsi.
Mahmud ascended the throne at the age of 27 upon his father's death, albeit after a brief war of succession with his brother Ismail. He was the first ruler to hold the title Sultan ("authority"), signifying the extent of his power while at the same time preserving an ideological link to the suzerainty of the Abbasid Caliphs. During his rule, he invaded and plundered the richest cities and temple towns, such as Mathura and Somnath in medieval India seventeen times, and used the booty to build his capital in Ghazni.

## Birth and background

Mahmud was born in the town of Ghazni in the region of Zabulistan (in present-day Afghanistan) on 2 November 971. His father, Sabuktigin, was a Turkic slave commander who laid foundations to the Ghaznavid dynasty in Ghazni in 977, which he ruled as a subordinate of the Samanids, who ruled Khorasan and Transoxiana. Mahmud's mother was a local woman of possible Iranian descent from a landowning aristocrat family in the region of Zabulistan, and he is therefore known in some sources as Mahmud-i Zavuli ("Mahmud from Zabulistan"). Not much about Mahmud's early life is known, other than that he was a school-mate and foster brother of Ahmad Maymandi, a Persian native of Zabulistan.

## Family

Mahmud married the daughter of Abu'l Haret Ahmad, and they had twin sons, Mohammad and Ma'sud, who succeeded him one after the other; his grandson by Mas'ud, Maw'dud Ghaznavi, also later became ruler of the empire. According to Mirat-i-Masudi ("Mirror of Masud"), a Persian-language hagiography written by Abdur Rahman Chishti in the 1620s, Mahmud's sister, Sitr-e-Mu'alla, was purportedly married to Dawood bin Ataullah Alavi, also known as Gazi Saiyyed Salar Sahu, whose son was Ghazi Saiyyad Salar Masud.
Mahmud's companion was a Georgian slave, Malik Ayaz, about whom poems and stories have been told.

## Early career

In 994 Mahmud joined 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 Empire became highly unstable, with shifting internal political tides as various factions vied for control, the chief among them being Abu'l-Qasim Simjuri, Fa'iq, Abu Ali, the General Bekhtuzin as well as the neighbouring Buyids and Kara-Khanid Khanate.

## Reign

Sabuktigin died in 997, and was succeeded by his son Ismail as the ruler of the Ghaznavid dynasty. The reason behind Sabuktigin's choice to appoint Ismail as heir over the more experienced and older Mahmud is uncertain. It may have been due to Ismail's mother being the daughter of Sabuktigin's old master, Alptigin. Mahmud shortly revolted, and with the help of his other brother, Abu'l-Muzaffar, the governor of Bust, he defeated Ismail the following year at the battle of Ghazni and gained control over the Ghaznavid kingdom. That year, in 998, Mahmud then traveled to Balkh and paid homage to Amir Abu'l-Harith Mansur b. Nur II. He then appointed Abu'l-Hasan Isfaraini as his vizier, and then set out west from Ghazni to take the Kandahar region followed by Bost (Lashkar Gah), which he transformed to a militarised city.
Mahmud initiated the first of numerous invasions of North India. On 28 November 1001, his army fought and defeated the army of Raja Jayapala of the Kabul Shahis at the Battle of Peshawar. In 1002 Mahmud invaded Sistan and dethroned Khalaf ibn Ahmad, ending the Saffarid dynasty. From there he decided to focus on Hindustan to the southeast, particularly the highly fertile lands of the Punjab region.
Mahmud's first campaign to the south was against an Ismaili state first established at Multan in 965 by a da'i from the Fatimid Caliphate in a bid to curry political favor and recognition with the Abbasid Caliphate; he also engaged elsewhere with the Fatimids. At this point, Jayapala attempted to exact revenge for an earlier military defeat at the hands of Mahmud's father, who had controlled Ghazni in the late 980s and had cost Jayapala extensive territory. His son Anandapala succeeded him and continued the struggle to avenge his father's suicide. In the Battle of Chach, he assembled a powerful confederacy that suffered defeat as his elephant turned back from the battle at a crucial moment, turning the tide in Mahmud's favor once more at Lahore in 1008 and bringing Mahmud control of the Shahi dominions of Udbandpura.

### Ghaznavid campaigns in the Indian subcontinent

Following the defeat of the Indian Confederacy, after deciding to retaliate for their combined resistance, Mahmud then set out on regular expeditions against them, leaving the conquered kingdoms in the hands of Hindu vassals and annexing only the Punjab region. He also vowed to raid and loot the wealthy region of northwestern India every year.
In 1001 Mahmud of Ghazni first invaded modern day Pakistan and then parts of India. Mahmud defeated, captured, and later released the Hindu Shahi ruler Jayapala, who had moved his capital to Peshawar (modern Pakistan). Jayapala killed himself and was succeeded by his son Anandapala. In 1005 Mahmud of Ghazni invaded Bhatia (probably Bhera), and in 1006 he invaded Multan, at which time Anandapala's army attacked him. The following year Mahmud of Ghazni attacked and crushed Sukhapala, ruler of Bathinda (who had become ruler by rebelling against the Shahi kingdom). In 1008–1009, Mahmud defeated the Hindu Shahis in the Battle of Chach. In 1013, during Mahmud's eighth expedition into eastern Afghanistan and Pakistan, the Shahi kingdom (which was then under Trilochanapala, son of Anandapala) was overthrown.
In 1014 Mahmud led an expedition to Thanesar. The next year he unsuccessfully attacked Kashmir. The ruler of Kashmir Sangramaraja had been an ally of the Hindu Shahis against the Ghaznavids, and Mahmud wanted retribution. Antagonized by Sangramaraja's having helped Trilochanapala, Mahmud invaded Kashmir. He advanced along the Tohi river valley, planning to enter Kashmir through the Tosamaidan pass. However, his advanced was checked by the strong fort of Loharkot. After having besieged the fort for a month, Mahmud abandoned the siege and retreated, losing many of his troops on his way and almost losing his own life as well. In 1021, Mahmud again attempted to invade Kashmir, but was again not able to advance beyond the Loharkot fort. After the two failed invasion attempts, he did not attempt to invade Kashmir again.
In 1018 Mahmud attacked Mathura and defeated a coalition of rulers there while also killing a ruler called Chandrapala. The city of Mathura was "ruthlessly sacked, ravaged, desecrated and destroyed". In particular, Al-utbi mentioned in his work Tarikh-e-yamini, that Mahmud Ghaznavi destroyed a "great and magnificent temple" in Mathura. According to Firishta, writing a "History of Hindustan" in the 16th-17th century, the city of Mathura was the richest in India, and was consecrated to Vāsudeva-Krishna. When it was attacked by Mahmud of Ghazni, "all the idols" were burnt and destroyed during a period of twenty days, gold and silver was smelted for booty, and the city was burnt down. The Art of Mathura fell into decline thereafter.
In 1021 Mahmud supported the Kannauj king against Chandela Ganda, who was defeated. That same year Shahi Trilochanapala was killed at Rahib and his son Bhimapala succeeded him. Lahore (modern Pakistan) was annexed by Mahmud. Mahmud besieged Gwalior, in 1023, where he was given tribute. Mahmud attacked Somnath in 1025, and its ruler Bhima I fled. The next year, he captured Somnath and marched to Kachch against Bhima I. That same year Mahmud also attacked the Jats of Jud and defeated them. Mahmud's desecration of the Somnath temple in Gujarat in 1024 CE motivated Rajput king Bhoja to lead an army against him, however after Somnath raid, Mahmud Gazhnavi chose a more dangerous route via Sindh, to avoid facing the invading powerful armies of Bhoja, he passed through a desert, where the scarcity of food and water killed a large number of his soldiers and animals, Kitabh Zainu'l Akhbar (c. 1048 CE) by 'Abd al-Hayy Gardizi, Tabaqat-i-Akbari by Nizamuddin Ahmad and Firishta's writings also mention this incident.
Christoph Baumer notes that in 1026 CE, Jats "inflicted heavy losses" on the army of Mahmud while it was on its way from Somnath to Multan. Later in 1027 CE, he avenged the attack by the Jats, who had been resisting "forced Islamisation" for the past 300 years, by ravaging their fleet in the Indus river. Even though the Jats had a bigger fleet than Mahmud, he is said to have had around 20 archers on each of his 1400 boats, stocked with "special projectiles" carrying naphtha, which he used to burn the Jats' fleet.
The Indian kingdoms of Nagarkot, Thanesar, Kannauj, and Gwalior were all conquered and left in the hands of Hindu, Jain, and Buddhist kings as vassal states and he was pragmatic enough not to neglect making alliances and enlisting local peoples into his armies at all ranks. Since Mahmud never kept a permanent presence in the northwestern subcontinent, he engaged in a policy of destroying Hindu temples and monuments to crush any move by the Hindus to attack the Empire; Nagarkot, Thanesar, Mathura, Kannauj, Kalinjar (1023) and Somnath all submitted or were raided. It is estimated Mahmud's invasions killed over 2 million people.

## Events and challenges

In 1025 Mahmud raided Gujarat, plundering the Somnath temple and breaking its jyotirlinga. He took away booty of 2 million dinars. The conquest of Somnath was followed by a punitive invasion of Anhilwara. Some historians claim that there are records of pilgrimages to the temple in 1038 that do not mention damage to the temple. However, powerful legends with intricate detail had developed regarding Mahmud's raid in the Turko-Persian literature, which "electrified" the Muslim world according to scholar Meenakshi Jain.

### Historiography concerning Somnath

Historians including Thapar, Eaton, and A. K. Majumdar have questioned the iconoclastic historiography of this incident. Thapar quoted Majumdar (1956):
   But, as is well known, Hindu sources do not give any information regarding the raids of Sultan Mahmud, so that what follows is based solely on the testimony of Muslim authors.
Thapar also argued against the prevalent narrative:
   Yet in a curiously contradictory manner, the Turko-Persian narratives were accepted as historically valid and even their internal contradictions were not given much attention, largely because they approximated more closely to the current European sense of history than did the other sources.

### Political challenges

The last four years of Mahmud's life were spent contending with the influx of Oghuz and Seljuk Turks from Central Asia and the Buyid dynasty. Initially, after being repulsed by Mahmud, the Seljuks retired to Khwarezm, but Togrül and Çagrı led them to capture Merv and Nishapur (1028–1029). Later, they repeatedly raided and traded territory with his successors across Khorasan and Balkh and even sacked Ghazni in 1037. In 1040, at the Battle of Dandanaqan, they decisively defeated Mahmud's son, Mas'ud I, resulting in Mas'ud abandoning most of his western territories to the Seljuks.

### Death

On 30 April 1030 Sultan Mahmud died in Ghazni at the age of 58. Sultan Mahmud had contracted malaria during his last invasion. The medical complication from malaria had caused lethal tuberculosis. His mausoleum is located in Ghazni, Afghanistan.

## Campaign timeline
### As emir

* 994: Gains the title of Saif ad-Dawla and becomes Governor of Khorasan under service to Nuh II of the Samanid Empire in civil strife
* 995: The Samanid rebels Fa'iq (leader of a court faction that had defeated Alptigin's nomination for Emir) and Abu Ali expel Mahmud from Nishapur. Mahmud and Sabuktigin defeat Samanid rebels at Tus
* 997: Kara-Khanid Khanate

### As sultan

* 999: Khorasan, Balkh, Herat, Merv from the Samanids. A concurrent invasion from the north by the Qarakhanids under Elik Khan (Nasr Khan) ends Samanid rule.
* 1000: Sistan from Saffarid dynasty
* 1001: Gandhara: Sultan Mahmud defeats Raja Jayapala in the Battle of Peshawar; Jayapala subsequently abdicates and commits suicide.
* 1002: Seistan: Is imprisoned in Khuluf
* 1004: Bhatia (Bhera) is annexed after it fails to pay its yearly tribute.
* 1005-6: Multan: Fateh Daud, the Ismaili ruler of Multan revolts and enlists the aid of Anandapala. Mahmud massacres the Ismailis of Multan in the course of his conquest. Anandapala is defeated at Peshawar and pursued to Sodra (Wazirabad).
Ghor and Muhammad ibn Suri are then captured by Mahmud, made prisoner along with Muhammad ibn Suri's son, and taken to Ghazni, where Muhammad ibn Suri dies. Appoints Sewakpal to administer the region. Anandapala flees to Kashmir, fort in the hills on the western border of Kashmir.
* 1005: Defends Balkh and Khorasan against Nasr I of the Kara-Khanid Khanate and recaptures Nishapur from Isma'il Muntasir of the Samanids.
* 1005: Sewakpal rebels and is defeated.
* 1008: Mahmud defeated the Hindu Shahis in the Battle of Chach near Hazro in Chach, and captures the Shahi treasury at Kangra, Himachal Pradesh.
* 1010: Ghor; against Amir Suri
* 1010: Multan revolts. Abul Fatah Dawood is imprisoned for life at Ghazni.
* 1012-1013: Sacks Thanesar
* 1012: Invades Gharchistan and deposes its ruler Abu Nasr Muhammad.
* 1012: Demands and receives remainder of the province of Khorasan from the Abbasid Caliph. Then demands Samarkand as well but is rebuffed.
* 1013: Bulnat: Defeats Trilochanpala.
* 1014: Kafiristan is attacked
* 1015: Mahmud's army sacks Lahore, but his expedition to Kashmir fails, due to inclement weather.
* 1015: Khwarezm: Marries his sister to Abul Abbas 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 Yamuna, 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 submit without battle.
* 1018-1020: Sacks the town of Mathura.
* 1021: Raises Ayaz to kingship, awarding him the throne of Lahore
* 1021: Kalinjar attacks Kannauj: he marches to their aid and finds the last Shahi King, Trilochanpaala, encamped as well. No battle, the opponents leave their baggage trains and withdraw from the field. Also fails to take the fort of Lokote again. Takes Lahore on his return. Trilochanpala flees to Ajmer. First Muslim governors appointed east of the Indus River.
* 1023: Lahore. He forces Kalinjar and Gwalior to submit and pay tribute: Trilochanpala, the grandson of Jayapala, is assassinated by his own troops. 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 is his last major campaign. The concentration of wealth at Somnath was renowned, and consequently it became an attractive target for Mahmud, as it had previously deterred most invaders. The temple and citadel are sacked, and most of its defenders massacred.
* 1025: Somnath: Mahmud sacks the temple and is reported to have personally hammered the temple's gilded Lingam to pieces, and the stone fragments are carted back to Ghazni, where they are incorporated into the steps of the city's new Jama Masjid (Friday Mosque) in 1026. He places a new king on the throne in Gujarat as a tributary. His return detours across the Thar Desert to avoid the armies of Ajmer and other allies on his return.
* 1025: Marches against the Jats of the Jood mountains who harry his army on its return from the sack of Somnath.
* 1027: Rey, Isfahan, Hamadan from the Buyids Dynasty.
* 1027: Devastates the fleet of Jats in Indus river to avenge the "heavy losses" suffered by his army in an onslaught by Jats in 1026 CE.
* 1028, 1029: Merv, Nishapur are lost to Seljuq dynasty

## View on religion and war

Under the reign of Mahmud of Ghazni, the region broke away from the Samanid sphere of influence. While he acknowledged the Abbasids as caliph as a matter of form, he was also granted the title Sultan in recognition of his independence.
Following Mahmud's recognition by the Abbasid caliphate in 999, he pledged a jihad and a raid on India every year. In 1005 Mahmud conducted a series of campaigns during which the Ismailis of Multan were massacred.
Following his quest for Jihad in India, Mahmud Ghazni not only ruined the Somnath temple and plundered its treasures but also killed every devotee present in the town. He did the same with women devotees, either killing them or kidnapped them to be later sold in the slave markets of Afghanistan.
Mahmud used his plundered wealth to finance his armies which included mercenaries. The Indian soldiers, whom Romila Thapar presumed to be Hindus, were one of the components of the army with their commander called sipahsalar-i-Hinduwan and lived in their own quarter of Ghazna practicing their own religion. Indian soldiers under their commander Suvendhray remained loyal to Mahmud. They were also used against a Turkic rebel, with the command given to a Hindu named Tilak according to Baihaki.
Indian historian Mohammad Habib states that there was no imposition of Jizya on "non-Muslims" during the reign of Mahmud of Ghazni nor any mention of "forced conversions":
   [H]is (Mahmud's) expeditions against India were not motivated by religion but by love of plunder.
A. V. Williams Jackson, Professor of Indo-Iranian Languages in Columbia University has written in his book History of India, "Mahmud vowed that every year he would wage a Holy War against the infidels of Hindustan". During the seventh year of his reign, Mahmud mintage from Lahore styled him as "Mahmud but-shikan" (Mahmud the breaker of idols).

## Legacy

By the end of his reign, the Ghaznavid Empire extended from Ray in the west to Samarkand in the north-east, and from the Caspian Sea to the Yamuna. Although his raids carried his forces across the Indian subcontinent, only a portion of the Punjab and of Sindh in modern-day Pakistan came under his semi-permanent rule; Kashmir, the Doab, Rajasthan, and Gujarat remained under the control of the local Hindu dynasties.
The booty brought back to Ghazni was enormous, and contemporary historians (e.g. Abolfazl Beyhaghi, Ferdowsi) give descriptions of the magnificence of the capital, as well as of the conqueror's munificent support of literature. He transformed Ghazni, the first centre 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. Mahmud brought whole libraries from Ray and Isfahan to Ghazni. He even demanded that the Khwarizmshah court send its men of learning to Ghazni.
Mahmud patronized the notable poet Ferdowsi, who after laboring 27 years, went to Ghazni and presented the Shahnameh to him. There are various stories in medieval texts describing the lack of interest shown by Mahmud to Ferdowsi and his life's work. According to historians, Mahmud had promised Ferdowsi a dinar for every distich written in the Shahnameh (which would have been 60,000 dinars), but later retracted his promise and presented him with dirhams (20,000 dirhams), at that time the equivalent of only 200 dinars. His expedition across the Gangetic plains in 1017 inspired Al-Biruni to compose his Tarikh Al-Hind in order to understand the Indians and their beliefs. During Mahmud's rule, universities were founded to study various subjects such as mathematics, religion, the humanities, and medicine.
The Ghaznavid Empire was ruled by his successors for 157 years. The expanding Seljuk empire absorbed most of the Ghaznavid west. The Ghorids captured Ghazni in 1150, and Mu'izz al-Din (also known as Muhammad of Ghori) captured the last Ghaznavid stronghold at Lahore in 1187.
Despite Mahmud's remarkable abilities as a military commander, he failed to consolidate his empire's conquests with subtle authority. Mahmud also lacked the genius for administration and could not build long term enduring institutions in his state during his reign.
The military of Pakistan has named its short-range ballistic missile the Ghaznavi Missile in honour of Mahmud of Ghazni. In addition, the Pakistan Military Academy, where cadets are trained to become officers of the Pakistan Army, also gives tribute to Mahmud of Ghazni by naming one of its twelve companies Ghaznavi Company.

## Personality

Sultan Mahmud thought of himself as "the Shadow of the God on Earth", an absolute power whose will is law. He paid great attention to details in almost everything, personally overseeing the work of every department of his divan (administration).
Mahmud appointed all his ministers himself without advising his wazir (chief advisor) or diwan, though occasionally he had to, as his religion dictated that Muslims should consult each other on all issues. Most of the time he was suspicious of his ministers, particularly of the wazir, and the following words are widely believed to be his: "wazirs are the enemies of kings..." Sultan Mahmud had numerous spies (called mushrifs) across his empire, supervised by the special department within his diwan.
Mahmud was a patron of literature, especially poetry, and he was occasionally found in the company of talented poets either in his palace or in the royal garden. He was often generous to them, paying unstintingly for their works according to their talent and worth.