Mahmud of Ghazni
Ghaznavid sultan from 998 to 1030 (971–1030)
From Wikipedia, the free encyclopedia
Abu al-Qasim Mahmud ibn Sabuktigin (Persian: ابوالقاسم محمود بن سبکتگین, romanized: Abu al-Qāṣim Maḥmūd ibn Sabuktigīn; 2 October 971 – 30 April 1030), usually known as Mahmud of Ghazni or Mahmud Ghaznavi (محمود غزنوی),[11] 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 present-day northwestern Iran proper to the Punjab in the Indian subcontinent, Khwarazm in Transoxiana, and Makran.
- Abu'l-Hasan Isfarayini (995–1013)
- Ahmad Maymandi (1013–1024)
- Hasanak Mikali (1024–1030)
| Mahmud of Ghazni | |||||
|---|---|---|---|---|---|
| |||||
Sultan Mahmud of Ghazni, conquering Qasdar (modern Khuzdar). Jamiʿ al-Tawarikh, 1314–15 | |||||
| Sultan of the Ghaznavid Empire | |||||
| Reign | March 998 – 30 April 1030
| ||||
| Predecessor | Ismail of Ghazni | ||||
| Successor | Muhammad of Ghazni | ||||
| Vizier | See list
| ||||
| Born | 2 October 971 Ghazni, Zabulistan, Samanid Empire | ||||
| Died | 30 April 1030 (aged 58) Ghazni, Zabulistan, Ghaznavid Empire | ||||
| Burial | |||||
| Issue | [9] | ||||
| |||||
| Persian | یمین الدوله امینالملة ابوالقاسم محمود بن سبکتگین | ||||
| Dynasty | Ghaznavid dynasty | ||||
| Father | Sabuktigin | ||||
| Religion | Sunni Islam (Shafi'i; Athari)[10] | ||||
| Military career | |||||
| Service years | c. 988–1030 | ||||
| Conflicts | See: § Campaign timeline | ||||
Highly Persianized,[12] 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.[13] 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.[14]
Mahmud ascended the throne at the age of 27[15] 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. In the thirty-two years of his reign he made thirty-five major and eleven minor campaigns.[16] He is reputed to be undefeated throughout his entire career.
Birth and background
Mahmud was born in the town of Ghazni in the region of Zabulistan (in present-day Afghanistan) on 2 October 971.[17] 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,[18][19] and he is therefore known in some sources as Mahmud-i Zavuli ("Mahmud from Zabulistan").[20] 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.[21]
Creed and Religious Alignment
Originally Sultan Mahmud was a follower of the Hanafi school of law, but shortly after his accession to the throne he showed inclination towards the Karramite sect and ultimately changed over to the Shafi'i school of law.[22] Although early in his reign Sultan Mahmud showed sympathies with the Karramiyya sect—evidenced by reports that he “would get angry for the Karramiyya” (yaghḍabu lil-Karramiyya).[23] Following Mahmud's death Ghaznavid poet Farrukhi said the heretics can now sleep peacefully:
"Alas and alack, the Qarmatiyan can now rejoice! They will be secure against death by stoning or the gallows."[24]
Mohammad Habib writes, according to contemporary gossip Mahmud had disbelief in the Day of Judgment and in the Hadith "that the scholars (ulama) are the successors of the prophets." He also suspicioned that Subuktigin was not his real father. Mahmud like other Muslim sovereigns paid visits to the renown Muslim saints. Amongst them Abu al-Hassan al-Kharaqani personally influenced him. According to one account, while returning to his palace one night, the Sultan ordered his golden lamp to be given to a poor student whom he saw reading in the light of a shop. That night the Prophet Muhammad appeared to him in a dream and said, "Son of Subuktigin, may God honour thee in both the worlds as thou hast honoured my successor!" The Sultan's three doubts were thus removed.[25]
Afterward, Mahmud came under the influence of the renowned scholar Abu Bakr 'Abdallah ibn Aḥmad al-Qaffal al-Marwazi, Abū Bakr al-Qaffal al-Marwazi a devout follower of the Ash'ari theological school and the Shafi'i madhhab.[26] This shift reflected a broader move within the Ghaznavid court to align with Sunni orthodoxy, distancing itself from anthropomorphic sects like the Karramiyya and from Isma'ili theology. Mahmud's theological stance is described by Al-Dhahabi as that of an Athari in creed and Shafi'i in jurisprudence. He mentioned Mahmud as someone who inclined towards the Athar, quote:
"The Sultan was inclined towards the Athar, except that he was from the Karamiyya."[27]
This quotation reflects his earlier theological position on creed, prior to his later shift towards the Shafi'i Athari view. Following his shift in creed, he was challenged by the Ash'ari theologian Ibn Furak, who contended that describing God as ‘above’ implied also describing Him as ‘below. He answered him by saying, quote:
Abu ʿAlī ibn al-Bannāʾ said: ʿAlī ibn al-Ḥusayn al-Akbarī narrated that he heard Abū Masʿūd Aḥmad ibn Muḥammad al-Bajalī say: Ibn Fawrak entered upon Sultan Maḥmūd and said: "It is not permissible to describe God as being above, because that would necessarily entail describing Him as being below. Whoever it is permissible for Him to have an above, it is permissible for Him to have a below." The Sultan replied: "I did not describe Him so that it would be necessary for me to do so. Rather, He described Himself."[28]
It is reported from Shaykh al-Islam Ibn Taymiyyah in his book Bayan Talbis al-Jahmiyyah that Mahmud used to curse the People of Innovation (Ahl al-Bid'ah), and that among them were the Ash'ariyyah. Quote:
“Sultan Mahmud ibn Sabuktigin relied on something similar to this in his kingdom, and he added to it by ordering the people of heresy to be cursed from the pulpits: so the Jahmites were cursed, and the Rafidis and the Haruriyya and the Mu'tazila and the Qadarites, and also the Ash'ariyya were cursed”[29]
He knew Quran by heart and was familiar with Muslim law and tradition.[30] According to Ghaznavid author Abu'l-Fadl Bayhaqi and poet Farrukhi Sistani, the sultan was punctilious in the performance of his religious duties and offered the regular prayers and read the Quran. In the month Ramadan, 2.5% Zakat was collected and spent on the poor.[31] Mahmud did not tolerate any deviation in Muslim subjects. Censorship was applied and an officer was appointed to punish heresy or delinquency. The followers of the Isma'ili Shia Qaramatians and Batini sects were suppressed in the empire. They were captured and imprisoned if they did not recant they were often executed.[32]
Mughal emperor Aurangzeb (r. 1658–1707) mentioned Mahmud as a Sultan who suppressed heresy in his kingdom.
“Sultan Mahmud, may God forgive his crimes did not allow half hearted religious men and heretics to enter his court, nay not even his kingdom, so that other people might not be misled by seeing such persons in the form of the dervish, and they themselves might have no power to mislead others.”[33]
Family
Mahmud married the daughter of Abu'l Haret Ahmad,[34] 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. In 999, Mahmud married Kara-khanid ruler Ilig Khan's daughter. In December 999, Mahmud sent his representatives to Uzgand, capital of Nasr Illig to escort Khan's daughter to Mahmud's palace.[35] The marriage was sealed in 1000 AD.[36] He also other sons excepbrotherse Isma'il, his initial rival for the throne; Abu'l-Muzaffar Nasr, the long-serving military commander and governor; and Abu Ya'qüb Yusuf, the youngest, who eventually succeeded Nasr in his prestigious roles.[37]
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.[38] Mahmud's companion was a Georgian slave, Malik Ayaz, about whom poems and stories have been told.[39]
Issues
He had seven sons and three daughters:[40]
- Abu Said Mas'ud
- Abu Ahmed Muhammad
- Sulaiman
- Ismail
- Nasr
- Ibrahim
- Abu Mansur Abdur Rashid
- Zainab, who was married to Yaghantigin, son of Qadir Khan of Kara-Khanid Khanate.
- An unknown daughter, married to the Ziyarid ruler Qabus.
- Another unknown daughter, married to the Ziyarid ruler Manuchihr son of Qabus.
Early career

In 988, Mahmud who was only fifteen years of age, took a prominent part in the First Battle of Laghman between his father and Jayapala.
On 23 October 994, he joined his father Sabuktigin in the capture of Khorasan from the rebel Fa'iq. Sabuktigin recognised his services and bestowed him the title of Saifu'd-Dawlah (Sword of the State) and appointed him to the command of the troops of Khurasan in place of Abu 'Ali Simjuri.
In April, 995 Abu Ali and Fa'iq attacked him at Nishapur, defeated his army captured his elephants and treasure. In July, Sabuktigin hastened to Mahmud's help. Sabuktigin engaged in battle defeating the allied army on 22 July 995 at Tus. Many officers of Abu Ali were captured and exchanged them for the elephants.
In 996 AD, when Ilig Khan of Kara-Khanid Khanate advanced on Bukhara, 'Abdu'llah, the wazir of Amir Nuh offended Sabuktigin to cede some portion of his empire. Sabuktigin sent Mahmud with 20,000 troops to replace him. During his absence, Abu'l-Qasim Simjuri brother of Abu Ali Simjuri seized Nishapur. Mahmud, with his uncle Bughrajuq, retook it without a fight. He then reconsolidated power in Khurasan. After Subuktigin's death Mahmud returned to Ghazni to contest the throne with his brother Ismail.[41]
Reign
War of Succession
Sabuktigin died in August 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.[42] 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.[43] That year, in 998, Mahmud then travelled to Balkh and paid homage to Amir Abu'l-Harith Mansur b. Nur II.[44] He then appointed Abu'l-Hasan Isfaraini as his vizier,[45] and then set out west from Ghazni to take the Kandahar region followed by Bust (Now Lashkar Gah in southwestern Afghanistan), which he transformed to a militarised city.[citation needed]

Conquest of Khorasan
After accession to the throne, the Samanid Amir Mansur II confirmed Mahmud the possession of Ghazni, Bust, eastern Khurasanian towns of Balkh, Tirmidh, and Herat but he was eager to recover Khorasan.[47] In 998 AD, Mahmud sought to expand Ghaznavid control into Khorasan. After failing to secure Khorasan through negotiations with Samanid Amir Mansur II, Mahmud invaded Nishapur in 999 AD. On 2 February 999, Mansur was assassinated by Samanid nobleman Begtuzun and Fa’iq, who placed his brother Abd al-Malik II to the throne. Mahmud took up the cause of the assassination of Mansur and advanced against the Samanids. A brief peace agreement was concluded ensuring Mahmud's control of Herat and Balkh. But the conflict resumed when Dara bin Qabus, who did not agree to the treaty attacked Mahmud’s army. Mahmud assembled his army near Merv. Ghaznavid forces, led by Mahmud, his brother Abu'l Muzaffar Nasr supported by cavalry and elephants, defeated the Samanid army of Abd al-Malik, Abu'l Qasim, Begtuzun, Fa'iq on 16 May 999 AD. The Samanid dynasty collapsed soon after with Fa'iq's death and the Kara-Khanid invasion of Bukhara, capturing Abd al-Malik in 999.[48] The Oxus River was decided as the borders between the two empires.[49]
Mahmud became a fully independent sovereign, with formal acknowledgement of the Abbasid caliph's spiritual overlordship. From 999 AD and onwards coins were issued of the title Wali Amir al-Mu'minin "Friend of the Commander of the Faithful".[50]
Conquest of Sistan

Khalaf ibn Ahmad (r. 963–1002), Saffarid ruler of Sistan had good relation with Sabuktigin, often helped him with military aid. After Sabuktigin's death and succession dispute between Mahmud and his brother Ismail, Khalaf took the opportunity and captured Pushang and Kuhistan, killing Mahmud's uncle Bughrajuq. Following Mahmud's consolidation of power in Ghaznavid territories, Khalaf was forced to acknowledge Ghaznavid suzerainty in 1000 AD. Shortly after Khalaf's assassination of his son Tahir led discontentment among some of the Saffarid generals who invited Mahmud to rule over Sistan.[52] In 1002, Mahmud invaded Sistan and dethroned Khalaf ibn Ahmad, ending the Saffarid dynasty. In 1003, a rebellion was suppressed in Sistan. During the rebellion the Hindu troops in Ghaznavid army sacked the Friday mosque of Zaranj, massacring Muslims and Christians in their church. Sistan was left in charge of Mahmud's uncle Abu'l Muzaffar Nasr.[53]
Conquest of Multan
During Mahmud's period, Multan was ruled by the Qaramatian ruler Fateh Daud. In March–April 1006, left Ghazni and marched to Multan crossing near Peshawar. There he was checked by Anandapal who was defeated and fled. He then laid siege on Multan and captured within a week. Mahmud began to reduce parts of Multan and Bhatiya but received the news of Kara-Khanid invasion of Khorasan. He left Sukhpal, alias Nawasa Shah in charge of Multan before proceeding towards Khorasan. In December 1007, Sukhpal taking advantage of the conflict in Khorasan revolted.[54] Mahmud marched for Multan but before any action was taken Sukhpal was captured by the frontier amirs and brought him captive to the royal camp.[55] In October 1010, Mahmud launched a decisive expedition and successfully subdued Multan.[54]
War with Kara-Khanid Khanate
In 1006 AD, The Kara-Khanid under Ilig Nasr Khan and Qadir Khan invaded Khorasan to annex it from the Ghaznavid Empire. In 1006, Ilig Khan’s forces briefly captured Balkh and Herat, but Sultan Mahmud swiftly expelled them by mid-1006. In 1008, Ilig Khan and Qadir Khan led a 50,000-strong army across the Oxus river but were decisively defeated by Mahmud’s forces, supported by elephants, at the Battle of Katar on 5 January 1008. The Kara-Khanids fled, suffering heavy losses, securing Ghaznavid control over Khorasan.[56]
Campaigns in the Indian subcontinent


War against the Hindu Shahi
Jayapala, the Hindu Shahi ruler, attempted to exact revenge for an earlier military defeat at the hands of Sabuktigin, who had controlled Ghazni in the late 980s and had cost Jayapala extensive territory. He invaded Ghazni but was defeated. After Sabuktigin's death in 997 Mahmud succeeded his father. He first invaded modern day parts of Pakistan and then India. On 28 November 1001, his army fought and defeated the army of Raja Jayapala of the Kabul Shahis at the Battle of Peshawar and Battle of Hund.[59] He captured, and later released the Hindu Shahi ruler Jayapala, who had moved his capital to Peshawar. Jayapala immolated himself and was succeeded by his son Anandapala who continued the struggle.[60] In 1005 Mahmud conquered Bhatia,[61] and Multan in 1006, at which time Anandapala's army attacked him at the Indus. In 1008, Mahmud attacked and crushed the Hindu Shahi rebel Sukhapala.[54]
On 31 December 1008, Mahmud defeated the allied army of Ujjain, Delhi, Kalinjar, Kannauj, Ajmer and Hindu Shahis in the Battle of Chach. He then marched to Nagarkot in Kangra valley and laid siege on the fort, which fell after three days of resistance. He placed officers in charge of Nagarkot and left for Ghazni in June 1009 AD. After this victory Ghaznavids annexed the region from Indus River to Nagarkot but after Mahmud's departure the territories of salt range was possibly recaptured by the Hindu Shahis soon after.[62] In October 1009, shortly after the capture of Nagarkot, Mahmud led campaign to Narayanpur in Alwar, Rajasthan. The Raja of Narayanpur resisted but was defeated; his town was captured. Mahmud then returned to Ghazni. Later, the Raja sent a friendly embassy offering annual tribute, 50 elephants, and 2,000 soldiers to serve the Sultan like other feudatories, in exchange for sparing his territories. The terms were accepted.[63] In 1012, Mahmud invaded Thanesar to obtain certain breed of large elephants for his army. Thanesar possessed the famous Chakrasvamin idol. Mahmud's invasion became a threat for the idol. Thus, Anandapala offered 50 elephants to spare it but was refused, as Mahmud aimed to eradicate idol worship across India. Raja Ram of Dera, possibly a devotee of the idol, tried to block the Sutlej crossing with a strong elephant-backed army but was defeated.[64] Mahmud reached Thanesar, the local raja fled, the town was plundered without resistance, the famous Chakrasvamin idol was destroyed and carried to Ghazni, where it was thrown into the public square.[65] In 1014, the fort of Nandana was captured after defeating Hindu Shahi and Lohara regiments under Bhima the son of Trilocanapala (r. 1011–1022) and Tunga prime minister of Sangramaraja (r. 1003–1028) in the Battle of Nandana.[66][67] He then proceeded against Trilocanpala who was joined by Tunga, on the west bank of Jhelum. Trilocanpala was defeated in the Battle of the River Tausi and the whole region up to Jhelum were annexed. He returned to Ghazni in July–August.[68] Mahmud then set out on regular expeditions against Indian kingdoms, leaving the conquered kingdoms in the hands of Hindu vassals and annexing only the Punjab region.[69] He also vowed to raid and loot the wealthy region of north-western India every year.[70]
Invasions of Kashmir (1015, 1021)
In 1015, Mahmud unsuccessfully attacked Kashmir. The ruler of Kashmir Sangramaraja had been an ally of the Hindu Shahis against the Ghaznavids, and Mahmud wanted retribution.[71][72] 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.[71][72][73] While returning to Ghazni, Mahmud marched into the Punjab to punish Bhimapala for joining the Hindu confederacy. He sieged Lahore and forcing Bhimapala to flee formally annexed the region of Punjab.[74][75]
Campaigns in the Doab
In 1018 Mahmud resolved to lead an expedition to Kannauj. Beginning his campaign in September, he was guided by the hill chief Sabli, grandson of Bamhi, Raja of Kalinjar, who had already submitted to the Ghaznavids.[76] On 2 December 1018, crossing Yamuna, the fort of Sirwasa was besieged and captured.[77] Mahmud next reached Baran modern Bulandshahr. The local ruler Hardat, alarmed, offered no resistance. According to Utbi, he surrendered with 10,000 men, embracing Islam. Gardizi and Nizam-ud-din Ahmad, however, state that Hardat fled, leaving the fort to his men. The garrison, unable to hold out, secured peace by paying huge tribute.[78] From Baran, Mahmud advanced on Mahaban, ruled by Kulchand, a powerful chief likely of the Yadu dynasty. Kulchand retreated with his army and elephants to a forest fort, where Mahmud discovered him. A fierce battle followed; the defenders, unable to hold out, fled across the Yamuna. Kulchand killed his wife and then himself.[79] Mahmud now advanced to Mathura which is said to be under the Raja of Delhi. However, no resistance was offered. The city was captured with ease, plundered and large part of it was razed to ground.[80] In particular, Al-utbi mentioned in his work Tarikh-e-yamini, that Mahmud Ghaznavi destroyed a "great and magnificent temple" in Mathura.[81] 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.[82] Leaving most of his army behind, Mahmud advanced to Kannauj, ruled by Rajyapal of the Pratihara dynasty. He arrived on 20 December 1018. Rajyapala fled across the Ganges to Bari forty miles east of Kannauj. Mahmud captured all the seven forts, plundered the city, and killed or enslaved thousands. The conquest of Kannauj, the main goal of the campaign, was thus achieved.[83] On the return to Ghazni, Mahmud besieged and captured the fort of Munj.[a] Mahmud advanced to Asi. The Raja of that place Chandar Pal Bhur fled, leaving five forts that were seized and plundered. The Sultan then marched north to Sharwa possibly the modern town of Sharwa near Meerut, where the Raja Chandar Ray prepared for fight but eventually fled on the advice of Bhimapala, son of Trilocanapala. Pursued by Mahmud, he was overtaken and defeated in battle on 6 January 1019, with his camp looted and many elephants captured.[85]
In 1020 AD, Mahmud led his campaign into India to punish the Chandella king Vidyadhara. Vidyadhara had attacked and killed the Pratihara king Rajyapala for his cowardly submission to Mahmud during the earlier campaign. He raised Rajyapala's son Trilochanpala to the throne. Vidyadhara had also promised assistance to the Hindu Shahi ruler Trilocanapala in reclaiming his ancestral kingdom from Sultan Mahmud. Hearing this the Sultan marched with his army to chastise Vidyadhara.[86] Mahmud upon entering into Central Punjab, faced Raja Bhijja, the Hindu Shahi governor of the territory. Bhijja fought with courage and was likely wounded in battle but survived. Despite his resistance, the region was permanently annexed. He then advanced into Eastern Punjab, between the Sutlej and Yamuna. According to al-Utbi, resistance arose here as well but was crushed and much of the region was annexed as well.[87] Trilocanpala tried to check the invading army but was defeated in the battle of the Ramganga. Mahmud advanced towards Bari, the new Pratihara capital after the sack of Kannauj. Before the Sultan arrived, Trilochanapala fled in fear. The Ghaznavid forces entered the city unopposed and, completely razed it to the ground. Lastly marching to Kalinjar, Mahmud sent his ambassadors to Vidyadhara to submit. The latters's refused resulted a battle in which Mahmud gained victory over the Chandela raja. He captured large number of booty before returning to Ghazni.[86]
In 1022 AD, Mahmud launched second campaign against the Chandella king Vidyadhara. En route, he attacked Gwalior fort, then held by probably Kirtiraja of the Kachchhapaghata dynasty. After a four-day defense, the Kachchhapaghata ruler surrendered, offering Mahmud valuable gifts and 35 elephants. The Sultan accepted them and continued his march. Mahmud soon reached Kalinjar fort and besieged it. After a prolonged siege, Chandella king Vidyadhara sent an envoy proposing peace, offering 300 elephants and other valuable gifts to end the siege. In return, Mahmud granted Vidyadhara control over 15 fortresses and withdrew to Ghazni in March–April 1023.[88]
In Mahmud attacked Somnath in 1025, and its ruler Bhima I fled. He captured Somnath which was under the charge of Mandalika of the Abhira dynasty a feudatory of Bhima.[89] Mahmud's desecration of the Somnath temple in Gujarat in 1026 AD motivated Rajput king Bhoja to lead an army against him, however after Somnath raid, Mahmud chose a more dangerous route via Sindh, to avoid facing the invading powerful armies of Bhoja, he passed through the Thar 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 and Tabaqat-i-Akbari by Nizamuddin Ahmad and Firishta's writings also mention this incident.[90][91] He reached Mansura, capital of Soomra dynasty of Sindh. Its ruler Khafif escaped into the Jungles. The city was sacked and burnt.[92] Sindh paid tribute from 1026 till his death in 1030 AD.[93] The Jats inflicted heavy losses on the army of Mahmud at the Indus while it was on its way from Somnath to Multan. In 1027, he launched a punitive expedition against the Jats, using 1,400 spiked boats to defeat their 4,000 vessels near Multan, killing or drowning most Jats and enslaving their families.[94][95]
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 north-western 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.[96] He raided India in Gurjara-Pratihara territory which included Somnath, Mathura and Kannauj.[97] Indian historian, Kishori Saran Lal, estimates Mahmud's invasions into India caused a population loss of 2 million people killed and enslaved.[98] In total, he invaded India seventeen times and plundered the richest cities and temple towns, using the booty to build his capital in Ghazni.[99][100]
Campaign of Ghur
Following the death of Sabuktigin in 997, Muhammad ibn Suri of Ghur adopted a hostile policy toward the Ghaznavids, withholding tribute and harassing their interests. In 1011, Sultan Mahmud led an expedition into eastern Ghur. The advance guard under Altuntash and Arslan Jadhib suffered an initial repulse, but Mahmud reinforced them and defeated the Ghurids. Muhammad ibn Suri and his son Shith were captured; Abu Ali, another son of ibn Suri, was installed as vassal ruler in Mandesh. In 1015, Mahmud campaigned in western Ghur, targeting Khwabin near Bust and Zamindawar. The defenders in a fortress surrendered after their leader Muqaddam was killed by an arrow shot by Mas'ud.[101] In September 1020, Mas'ud led an expedition to subjugate north-western Ghur. He was joined by local chieftains Abul Hasan Khalaf and Sherwan. Mas'ud captured forts and subjugated various chiefs. These campaigns brought most of Ghur except possibly its innermost parts under Ghaznavid control.[102]
Conquest of Qusdar

The kingdom of Qusdar, situated roughly to the north-eastern half of modern Balochistan.[103] Qusdar became dependency of Ghazni during the first years of Sabuktigin's reign.[104] During 1010–1011 CE, its ruler adopted a hostile attitude at the instigation of Ilig Khan and withheld the annual tribute. Sultan Mahmud marched against him in December 1011 AD and laid siege to Qusdar. The ruler offered submission and, promised annual tribute. The Sultan accepted these terms, allowed the ruler to retain his kingdom as a feudatory chieftain, and returned to Ghazni.[103]
Incorporation of Guzgan
The Farighunid dynasty ruled Guzgan from before the 10th century until the early 11th century. The Ghaznavids and Farighunids started as allies around 995 AD with joint campaigns in Khorasan. A double marriage tied the two dynasties. Mahmud married a Farighunid princess, and his sister married a Farighunid prince. Following Mahmud's succession to the throne, the Farighunids became loyal Ghaznavid vassals, fighting in Mahmud’s major battles. After the last Farighunid ruler Abu'l-Nasr Muhammad died in 1010–1011 CE, Sultan Mahmud annexed Guzgan directly into the Ghaznavid empire, appointed his own son Muhammad as governor, therefore ending the Farighunid dynasty.[105]
Conquest of Gharchistan
In May 999, following his conquest of Khorasan from the Samanid ruler 'Abd al-Malik II, Mahmud dispatched al-Utbi to the ruler of Gharchistan, Abu Nasr Muhammad ibn Asad ash-Shar to acknowledge Mahmud as the overlord. The Shar agreed, submitting as a vassal and replacing the Samanid amir's name with Mahmud's in the khutbah. Later, the Shar's son and successor, Shah Muhammad ibn Abi Nasr Muhammad, provoked Mahmud by refusing to join a military expedition and responding arrogantly when summoned to account for his actions. In response, Mahmud ordered his generals Altuntash, Arslan Jadhib, and Abu'l-Hasan al-Mani'i, the governor of Marv al-Rudh to invade Gharchistan in 1012. Despite the region's rugged terrain, the Ghaznavid forces advanced to the capital, Afshin situated fifty miles above Marv al-Rudh. The elder Shar, Abu Nasr Muhammad, submitted peacefully and received honourable treatment. However, Shah Muhammad resisted, retreating to a nearly inaccessible hill fortress. The Ghaznavids besieged the stronghold, breaching its outer walls with battering rams. After fierce defence, the garrison surrendered, and Shah Muhammad was captured along with many officers. He was imprisoned and died in captivity a few years later. His vizier was tortured to reveal hidden treasures. The kingdom of Gharchistan was fully annexed to the Ghaznavid Empire in 1012 and placed under the administration of Abu'l-Hasan al-Mani'i.[106]
Conquest of Khwarazm
In 1017 AD, Mahmud resolved to conquer Khwarazm which was under the Ma'munids. Ma'mun I ibn Muhammad annexed Khwarazm after defeating Afrighid Shah Abu 'Abdallah Muhammad in 995 AD. After Ma'mun's assassination in 997 AD, his son Abu al-Hasan Ali ruled until 1009 AD, followed by his brother Abu'l-Abbas Ma'mun. He faced pressure to acknowledge Mahmud’s suzerainty, leading to his submission by reading the khutbah in Mahmud’s name. This sparked a mutiny, culminating in his assassination in March 1017 AD by rebels led by Alptigin, who installed Abul-Abbas’s young son as ruler. Sultan Mahmud, enraged, invaded Khwarazm, defeated the rebels on 3 July 1017, and captured Gurganj, executing Alptigin and other regicides.[107]
Conquest of Kafiristan
Sultan Mahmud upon learning that the valleys of the Nur and Qirat rivers,[b] were inhabited by communities that practised lion worship ("lion" likely referred to an epithet of Buddha, Buddhism being the prevailing religion of the region), decided to conquer the region and promote the adoption of Islam. In May–June 1020 AD, Mahmud led his expedition. The ruler of the Qirat valley promptly submitted, converted to Islam along with many of his subjects, and was honourably received. Mahmud confirmed him as a vassal ruler over his territory. The inhabitants of the Nur valley, however, resisted. Mahmud sent his chamberlain, 'Ali ibn Il-Arslan al-Qarib, who subdued them and installed a garrison under 'Ali ibn Qadr-i-Rajuq to secure the region. Following the campaign, the sultan appointed preachers to instruct the new converts in the fundamentals of Islam before returning to Ghazni.[108]
Campaigns in Transoxiana
In 1023 AD, Arslan Khan (r. 1018–1023) of Kara-Khanid Khanate died and succession struggle broke out between Qadir Khan the ruler of Kashgar and Tughan Khan the brother of Ali-Tegin of Bukhara. Tughan Khan won and seized Balasaghun, the capital of Kara-Khanid Khanate. Concerned by the rising power of Ali-Tegin and Tughan Khan, Mahmud invaded Transoxiana in September 1024. Crossing the Oxus with 500 elephants he advanced on Samarkand ith local support and Altuntash the Khwarazmshah. Ali-Tegin fled to the steppes without a fight; Mahmud captured his family but treated them with honor.[109] Qadir Khan then arrived in Samarkand and formed an alliance with Mahmud on 29 April 1025, sealed by a double marriage: Mahmud's daughter Zainab to Qadir's son Yaghantigin, and Qadir's daughter to Mahmud's son Muhammad. Mahmud left Samarkand to Qadir Khan and returned to Ghazna. Soon after, Ali-Tegin returned, defeated Qadir Khan, and retook Samarkand. Qadir sent his son for Mahmud's help, but Mahmud was preparing for the Somnath expedition and could not assist. After returning from Somnath in 1026, Mahmud sent Abu Bakr Hasiri with a large force to aid Qadir Khan. They defeated Ali-Tegin and forced him to terms. Qadir Khan remained on good terms with Mahmud.[110][111] Mahmud’s successful campaigns in Central Asia greatly boosted his prestige across Inner Asia. By 1026, his influence was so significant that the Liao in northern China and the Qocho in East Turkistan sent embassies to propose marriage alliances. However, Mahmud declines the offers as they were pagans:[112][113]
“You are infidels and we are Muslims; it is not fitting that we should give you our sister and daughter”
Conflicts with the Seljuks

The Oghuz tribes under the Seljuk dynasty, initially served as frontier auxiliaries in the regions of Khwarazm and Transoxiana. Oghuz under the Yabghu of Yengi-Kent became a Muslim in 1003 and supported Isma'il al-Muntasir, the final claimant from the Samanid dynasty, until his death in 1005. The Seljuk rivals, following the collapse of the Samanid dynasty, relocated their pastures near Bukhara and accordingly offered their military services to the Samanid's adversaries, the Kara-Khanids. Toghril and Chaghri initially fought on behalf of a Kara-Khanid ruler known as Bughra Khan. They subsequently allied with their uncle Arslan Isra'il in the service of a rival Kara-Khanid prince, Ali-Tegin, who controlled Bukhara and Samarkand.[114][115] When Mahmud crossed into Transoxiana in 1025, both Ali-Tegin and Arslan Isra'il fled from Bukhara. Ali-Tegin manged to escape, but Arslan Isra'il was captured in and imprisoned till his death. The Seljuk tribesmen subsequently approached Mahmud, requesting permission to settle in Khorasan on the grounds that they were oppressed by their commanders in Transoxiana. The sultan agreed, intending to incorporate them as recruits into his army. As a result, approximately four thousand Seljuk families, under their chieftains were permitted to settle on the margins of the desert in the districts of Sarakhs, Farawa, and Abiward where they promised to act as frontier guards. They were prohibited from bearing arms and required them to disperse their settlements. Soon the Seljuks became disruptive in the region. By late 1027, the inhabitants of Nasa and Abiward complained to the sultan of their violence and depredations. Mahmud dispatched Arslan Jadhib to suppress them, but the Seljuks proved too formidable, and Jadhib's efforts failed. Despite his own illness, Mahmud personally led a campaign against the Seljuks in 1028. He advanced to Tus and reinforced Arslan Jadhib with additional troops. This time, the Ghaznavid forces achieved success, inflicting a decisive defeat on the Seljuks at the Ribat-i-Farawa. Thousands of the Seljuks were captured and executed. Many of them fled and joined in the service of other neighbouring empires.[116]
Persian campaigns
In 1012, Mahmud secured dominance over Ziyarids in Northern Persia.[117] In 1029 AD, Daylamite troops threatened the weak ruler Majd al-Dawla, who sought help from Sultan Mahmud. Mahmud taking the opportunity sent 8,000 cavalries to capture Majd al-Dawla, while he marched to Jurjan to prevent Seljuk interference. In May, Ghaznavids captured Ray and put Majd al-Dawla under surveillance. On 26 May 1029, Mahmud entered Ray without resistance, seizing significant wealth. Majd al-Dawla was imprisoned and sent to India. Mahmud ordered Mas'ud to lead campaign against the remaining of Buyid territories. Mas'ud went against the Kakuyids of Hamadan and Isfahan. He first captured Hamadan and then advanced to Isfahan, which was seized in January 1030.[118] The Ghaznavids then subjugated the neighbouring kingdoms in Azerbaijan, and Northern Iran with Rawadids and Sallarids paying tribute.[119][120]
Last days
Sultan Mahmud had contracted malaria during his expedition against Jats in 1027 AD which was his last invasion in India. The medical complication from malaria had caused lethal tuberculosis. For two years he suffered from this disease. In spite of the warnings of his physicians he carried his daily routine and engaged in court activities.[122]
After chasing the Seljuks out of Khorasan and campaign in Ray, he spent the summer of 1029 in Khorasan following winter in Balkh. The climate of Balkh was unsuitable for him therefore he returned back to Ghazni about 22 April 1030 AD.[123]
On Thursday, 30 April, after resting a week in the capital Ghazni, Mahmud died at 5 o'clock, at the age of 58 years. He was buried at the same evening at the time of Isha prayer in the Firuzi garden his favourite pleasure resort.[124] His mausoleum is located in the village of Rawza (Rawdza), 4 kilometres northeast of Ghazni, Afghanistan.[125][126][127]
Campaign timeline
Indicates a favorable outcome Indicates an unfavorable outcome Indicates an uncertain or mixed outcome
| № | Date(s) | Clash(es) | Type(s) | Conflict(s) | Opponent(s) | Location(s) | Result(s) |
|---|---|---|---|---|---|---|---|
| 1. | 987 | First Battle of Laghman | Battle | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Laghman | Victory |
| 2. | 23 October 994 | Capture of Khorasan | Battle | Samanid civil strife | Faiq Khass | Khorasan | Victory |
| 3. | April 995 | Battle of Nishapur | Battle | Samanid civil strife | Abu Ali Simjuri Faiq Khass |
Nishapur | Defeat |
| 4. | 22 July 995 | Battle of Tus | Battle | Samanid civil strife | Abu Ali Simjuri Faiq Khass |
Tus | Victory |
| 5. | March 998 | Battle of Ghazni | Battle | War of succession | Ismail of Ghazni | Ghazni | Victory |
| 6. | 16 May 999 | Battle of Merv | Battle | Ghaznavid–Samanid war | Samanids | Merv | Victory |
| 7. | December 999 | Siege of Ispahbud | Siege | Ghaznavid–Saffarid war | Saffarids | Sistan | Victory |
| 8. | c. 1000 | Capture of forts in Laghman | Siege | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Laghman | Victory |
| 9. | 27 November 1001 | Battle of Peshawar | Battle | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Peshawar | Victory |
| 10. | February 1002 | Battle of Hund | Battle Siege |
Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Hund | Victory |
| 11. | November 1002 | Siege of Taq | Siege | Ghaznavid–Saffarid war | Saffarids | Sistan | Victory |
| 12. | September 1003 | Siege of Uk | Siege | Ghaznavid–Saffarid war | Rebels | Sistan | Victory |
| 13. | 1004–1005 | Battle of Bhatiya | Battle | Siege of Bhatiya | Kingdom of Bhatiya | Bhatiya | Victory |
| 14. | 1004–1005 | Siege of Bhatiya | Siege | Siege of Bhatiya | Kingdom of Bhatiya | Bhatiya | Victory |
| 15. | March–April 1006 | Battle of the Indus | Battle | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Indus | Victory |
| 16. | 1006 | Siege of Multan | Siege | Ghaznavid conquest of Multan | Lodi dynasty of Multan | Multan | Victory |
| 17. | 5 January 1008 | Battle of Balkh | Battle | Kara-Khanid invasion of Khorasan | Kara-Khanid Khanate | Balkh | Victory |
| 18. | 1008 | Suppression of revolt in Multan | Battle | Ghaznavid conquest of Multan | Hindu Shahis | Multan | Victory |
| 19. | 31 December 1008 | Battle of Chach | Battle | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Chhachh | Victory |
| 20. | 1009 | Capture of Nagarkot | Siege | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Nagarkot | Victory |
| 21. | 1010 | Battle of Multan | Battle | Ghaznavid conquest of Multan | Lodi dynasty of Multan | Multan | Victory |
| 22. | 1011 | Skirmish at Ghur | Battle | Ghaznavid campaign of Ghur | Ghurid dynasty | Ghor | Victory |
| 23. | 1011 | Siege of Ahangaran | Siege Battle |
Ghaznavid campaign of Ghur | Ghurid dynasty | Ghor | Victory |
| 24. | 1012 | Battle of the Sutlej | Battle | Ghaznavid campaign in India | Rama of Dera | Sutlej | Victory |
| 25. | 1012 | Sack of Thanesar | Surrender Plunder |
Ghaznavid campaign in India | Kingdom of Thanesar | Thanser | Victory |
| 26. | March 1014 | Battle of Nandana | Battle | Ghaznavid–Hindu Shahi Wars | Hindu Shahis Lohara dynasty |
Nandana Fort | Victory |
| 27. | March 1014 | Siege of Nandana | Siege | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Nandana Fort | Victory |
| 28. | 1014 | Battle of the River Tausi | Battle | Ghaznavid–Hindu Shahi Wars | Hindu Shahis Lohara dynasty |
Poonch River | Victory |
| 29. | 1015 | Siege of Lohkot (1015) | Siege | Ghaznavid campaigns in India | Lohara dynasty | Lohkot Fort | Inconclusive |
| 30. | 3 July 1017 | Battle of Gurganj | Battle | Ghaznavid conquest of Khwarazm | Ma'munids | Gurganj | Victory |
| 31. | December 1018 | Siege of Sirwasa | Siege | Ghaznavid campaign in India | Fort of Sirwasa | Sirwasa | Victory |
| 32. | December 1018 | Siege of Bulandshahr | Surrender | Ghaznavid campaign in India | Hardat of Bulandshahr | Bulandshahr | Victory |
| 33. | December 1018 | Capture of Mahaban | Battle | Ghaznavid campaign in India | Kulchand of Yadu dynasty | Mahaban | Victory |
| 34. | December 1018 | Capture of Mathura | Plunder | Ghaznavid campaign in India | Tomaras of Delhi | Mathura | Victory |
| 35. | 20 December 1018 | Capture of Kannauj | Plunder | Ghaznavid campaign in India | Patihara dynasty | Kannauj | Victory |
| 36. | December 1018 | Siege of Munj | Siege | Ghaznavid campaign in India | Fort of Munj | Unknown | Victory |
| 37. | December 1018 | Siege of Asi | Siege | Ghaznavid campaign in India | Fort of Asi | Asi | Victory |
| 38. | 6 January 1019 | Battle of Sharwa | Battle | Ghaznavid campaign in India | Fort of Sharwa | Sharwa near Meerut | Victory |
| 39. | May–June 1020 | Expedition of Qirat | Surrender | Unknown ruler of Qirat | Kafiristan | Victory | |
| 40. | October 1020 | Conquest of Central Punjab | Battle | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Central Punjab | Victory |
| 41. | 1020 | Conquest of Eastern Punjab | Battle | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Eastern Punjab | Victory |
| 42. | 1020 | Battle of the Ramganga | Battle | Ghaznavid–Hindu Shahi Wars | Hindu Shahis | Ramganga | Victory |
| 43. | 1020 | Siege of Bari | Plunder | Ghaznavid campaign in India | Patihara dynasty | Bari | Victory |
| 44. | 1020 | Battle of Kalinjar | Battle | Ghaznavid campaign in India | Chandelas of Jejakabhukti | Kannauj | Victory |
| 45. | September–October 1021 | Siege of Lohkot | Siege | Ghaznavid campaign in India | Lohkot fort | Lohkot | Inconclusive |
| 46. | 1021 | Siege of Lahore | Siege | Ghaznavid–Hindu Shahi Wars | Lahore | Lahore | Victory |
| 47. | 1022 | Siege of Gwalior | Siege | Ghaznavid campaign in India | Kachchhapaghata dynasty | Gwalior | Victory |
| 48. | 1022 | Siege of Kalinjar | Siege | Ghaznavid campaign in India | Chandelas of Jejakabhukti | Kalinjar | Victory |
| 49. | September 1024 | Capture of Samarkand | No engagements | Campaigns in Transoxiana | Kara-Khanid Khanate | Samarkand | Victory |
| 50. | 1025 | Siege of Lodhruva | Siege | Ghaznavid campaigns in India | Bhati Kingdom | Lodurva | Victory |
| 51. | 1025 | Siege of Sambhar | No engagement | Ghaznavid campaigns in India | Chahamanas of Shakambhari | Sambhar | Victory |
| 52. | 1025 | Capture of several forts | Siege | Ghaznavid campaigns in India | Unknown | Between Sambhar and Patan | Victory |
| 53. | 1025 | Capture of Patan | No engagement | Ghaznavid campaigns in India | Chaulukya dynasty | Patan | Victory |
| 54. | 1025 | Capture of several forts | Siege | Ghaznavid campaigns in India | Unknown | Between Patan and Kathiawar | Victory |
| 55. | 1025 | Capture of Delvada | Siege | Ghaznavid campaigns in India | Unknown | Delvada | Victory |
| 56. | 1025 | Battle of Kathiawar | Battle | Ghaznavid campaigns in India | Chaulukya dynasty | Kathiawar, between Delvada and Mundher | Victory |
| 57. | 8 January 1026 | Sack of Somnath | Siege | Ghaznavid campaigns in India | Abhira dynasty | Veraval | Victory |
| 58. | 1026 | Siege of Kanthkot | Siege (No engagement) Plunder |
Ghaznavid campaigns in India | Chalukya dynasty | Kanthkot | Victory |
| 59. | 1026 | Sack of Mansura | Plunder | Ghaznavid campaigns in India | Soomra dynasty | Mansura | Victory |
| 60. | 1027 | Battle of the Indus | Naval warfare | Ghaznavid campaigns in India | Jats | Indus River | Victory |
| 61. | 1028 | Battle of Ribat-i-Farawa | Battle | Seljuks | Ribat-i-Farawa | Victory |
As emir
- 987: War with Hindu Shahis under Sabuktigin at First Battle of Laghman.[41]
- 994: Gains the title of Saifu'd-Dawlah 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 Simjuri expel Mahmud from Nishapur. Mahmud and Sabuktigin defeat Samanid.[41]
- 996: Mahmud deposed Amir Nuh's wazir Abdullah bin Muhammad bin Uzair at Balkh. Abu Ali Simjuri and Faiq recaptured Khorasan. However evacuated after Mahmud and his uncle Bughrajuq's approach.[41]
- 998: Defeated and dethroned Ismail in Battle of Ghazni (998).[43]
As sultan
- 999: Gained Balkh, Herat, Tirmidh, Bust from the Samanids.[47] Conquest of Khorasan from the Samanids. Mahmud recognised as the overlord of Gharchistan.[48]
- 1000: Capture of forts in Lamghan.[128]
- 1001: Gandhara and Peshawar annexed after defeating Raja Jayapala in the Battle of Peshawar.[129] Capture of Hindu Shahi capital Udabhandapura (Hund) after Battle of Hund. Mahmud further subjugated lower Kabul valley.[59]
- 1002: Sistan captured from the Saffarid dynasty.[53]
- 1003: Suppression of rebels in Sistan.[53]
- 1004–5: Conquest of Bhatia.[61]
- 1005–6: Fateh Daud, the Ismaili ruler of Multan[130] revolts and enlists the aid of Anandapala. Mahmud massacres the Ismailis[131][132] of Multan in the course of his conquest. Anandapala is defeated at Peshawar and pursued to Sodra (Wazirabad). Defends Balkh and Khorasan against Nasr I of the Kara-Khanid Khanate and recaptures Nishapur from Isma'il Muntasir of the late Samanids.
- 1007–8: Sukhapala rebels and was defeated.[54]
- 1008: Mahmud defeated the Hindu Shahis in the Battle of Chach near Hazro in Chach.[133]
- 1009: Conquest of Nagarkot. Possibly territories between the Indus River to Nagarkot was annexed by the Ghaznavids which was subsequently recaptured by the Hindu Shahis.[134] Mahmud captured Narayanpur.[135][63]
- 1010: Final conquest of Multan.[54]
- 1011: Ghaznavid campaign of Ghur. Amir Suri imprisoned. Rebellion of the ruler of Qusdar but defeated and submission of its ruler.[136] Incorporation of Guzgan in 1010–1011 AD.[105]
- 1012: Defeats Rama of Dera at Sutlej.[64] Capture and sack of Thanesar.[137][65] Incorporation Gharchistan and deposition of its ruler Abu Nasr Muhammad.[106]
- 1014: Defeats Bhimapala and Tunga at the Battle of Nandana and captured the Nandana Fort.[66] Defeats Trilocanpala and Tunga at the Battle of the River Tausi. Thus territories up to Jhelum River were annexed.[68]
- 1015–16: Mahmud advanced against Balkh.[138] His expedition to Kashmir fails, due to inclement weather.[139]
- 1017: Khwarazm conquered and placed under Altuntash.[107]
- 1018–19: Capture of Sirwasa,[77] Bulandshahr,[78] Mahaban,[79] Mathura,[140] and Kannauj.[80] Munj, Asi and Sharwa were captured en route to Ghazni.[85][141]
- 1020: During May–June Subjugation of the valleys of Nur and Qirat River in Kafiristan.[108] In October, Mahmud defeats Trilocanpala at the Battle of the Ramganga. Next captured Bari and soon Vidyadhara defeated in a battle.[86]
- 1021: Second attempt to capture Lohkot fort fails again due to harsh winter climate. Mahmud captures Lahore before returning to Ghazni. Official annexation of Punjab.[75]
- 1022: Conquest of Central Punjab and Eastern Punjab.[87] Chandelas of Jejakabhukti and Kachchhapaghata dynasty submit Kajlinjar and Gwalior respectively and pay tribute to Mahmud.[142]
- 1024–1025: Mahmud defeats Ali-Tegin the Kara-Khanid ruler of Samarkand.[109] Arslan Isra'il of the Seljuks captured.[116]
- 1025–26: Captured Lodhruva,[92] Sambhar,[143] Mundhera, Delvada,[144] in addition to many other minor fortress and defeated Hindu army at Kathiawar[145] en route to Somnath. Capture and sack of Somnath. His return detours across the Thar Desert to avoid the armies of other Indian allies on his return. While returning Mahmud captured the fort of Kanthkot. Soomra capital Mansura sacked in Sindh.[92]
- 1027: Defeats the fleet of Jats in Indus River to avenge the heavy losses suffered by his army in an onslaught by Jats in 1026 CE.[95]
- 1028: Defeats the Seljuks at Ribat-i-Farawa.[116]
- 1029-30: Campaign in Persia led annexation Ray, Isfahan, Hamadan, Jibal from the Buyids and Kakuyids as well as submission of Rawadids and Sallarids.[citation needed]
Administration

Sultan Mahmud had five important ministers who were in charge of different offices:[146]
- Dīwān-i-Wizārat or Finance Department
- Dīwān-i-‘Ard or War Department
- Dīwān-i-Risālat or Correspondence Department
- Dīwān-i-Shughl-i-Ishrāf-i-Mamlukat or Secret Service Department
- Dīwān-i-Wikālat or Household Department
He paid great attention to details in almost everything, personally overseeing the work of every department of his divan (administration).[147]
The Wazir or Grand Vizier
Mahmud appointed all his ministers himself without advising his diwan, though occasionally he had to, as his religion dictated that Muslims should consult each other on all issues.[148] 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..."[149]
Mahmud had three Wazirs. In 995 AD, former Samanid nobleman Abu'l-'Abbas Fadl b. Ahmad, became the first Wazir of Mahmud. In 1013 AD, he was charged with extortion and imprisoned. He died the same year. He was succeeded by Mahmud's foster brother Shamsu'l Kufat Abu'l Qasim Ahmad bin Hasan al Maimandi in 1014 AD. In 1025 AD he was dismissed and sent to fort of Kalanjar. After the Sultan's death he was reappointed by Mas'ud I. Ahmad was succeeded by Abū ‘Alī Hasan bin Muhammad bin ‘Abbās. In 1023 AD he went to Hajj. The Fatimid ruler Al Zahir honoured him with a Khil’at (robe of honour) which offended Abbasid Caliph Al-Qadir. Sultan Mahmud sent the Khi’lat to Baghdad to be burnt. During the time of his service he often insulted Masud. After Masud became Sultan he was charged of being a Qaramatian and put to death in 1031 AD.[150]
Military Department

The head of the Dīwān-i-‘Ard or the military department was known as Ārid or Şahib-i-Dīwān-i-'Ard.[151] The Arid's duty was to maintain the welfare of soldiers and efficiency as well as to maintain the collection of war booty. Every year he reviewed the entire Ghaznavid army which marched before him in the plains of Shabahar, Ghazni. The assistant of Ārid was called Naib-i-‘Ard. The Ārid kept the records of fallen soldiers from illness, retirement and war. During war times the Arid was the Quarter Master General of the army.[152]
The army consisted of cavalry, infantry, elite body guards and elephants. The core of the army was slave soldiers.[153] The bodyguards of the Sultan consisted chiefly of slaves under direct order of Sultan. Their banner had the distinctive device of a lion and spears. Mahmud's army employed Hindus as elephant drivers and their commander was called Muqaddam-i-Pil-bānān. The elephants, too, were under the direct control of the Sultan.[154] During Mas'ud's reign the commander of the army in India was shifted to a Hindu ghulam (slave) named Tilak.[155]
Numerical Strength of the Army
In 999 AD, when Mahmud defeated the Samanid under Abdu'l-Malik ibn Nuh at Marv, commanding at least 32,000 horses. In 1015-16 AD, he invaded Balkh. Ghaznavid era Historian Abu'l-Fadl Bayhaqi estimated the sultan's army numbered 100,000 soldiers.[156] In 1018, prior to the Kannauj campaign, Mahmud secured his realm by assigning Muhammad to Ghazna with 15,000 horse and 10,000 foot, Mas‘ud with 10,000 horse and 10,000 foot, Arslan Jadhib to Balkh and Tukharistan with 12,000 horse and 10,000 foot, and Altuntash to Khwarazm with 20,000 horse and 10,000 foot[157] In 1023 AD, army was reviewed at the plains of Shabahar numbering 54,000 cavalry and 1300 elephants, besides the garrisons in the outposts of the empire to guard the long frontier. 12th century historian Sibt Ibn al-Jawzi puts the strength of his army roughly at 100,000, including both the cavalry and infantry. In Makran expedition to place Abu'l Mu'askar to the throne Sultan Mahmud dispatched an army of 4000 cavalry and 3000 infantry. In 1029 an army of 8,000 cavalrymen was composed during the conquest of Rey. In 1035, 15,000 cavalry and 2000 ghulams participated in the battle of Nasa against the Seljuks.[158] The total number of the slaves were about 4000 and elephants in 1700.[159] Each of the elephants used to cost 100,000 dirhams.[160]
Administration of the Army
The sultan was the chief commander of the army. The next highest office under him was the commander of Khurasan which was held by his brother Nasr and Yusuf successively.[161] The army was mainly recruited from Transoxiana but Arabs, Afghans, Daylamites, Khurasanis, Ghuris and Indians were also recruited.[162]
Each province had a commander of the local troops, who was usually a Turkomān. Every provincial army had its own Arid who had an assistant called Nā'ib-i-'Ard and a Kat-khuda, i.e. Quarter-master. There was a Şahib-Barid, or Master of the Post, attached to every army.[163]
Hierarchy of the Army
The hierarchy of the army follows:
- The Khail-tāsh, commander of 10 horses.
- The Qa'id, who commanded a khail, approximately one hundred horses.
- The Sarhang, who was the commander of five hundred horses.
- Hajib, who was the officer commanding the army
- Sipah-Sālār, controlled all the troops in a province.
Every army had a separate magazine and armoury, and arms were distributed among the soldiery shortly before the battle.[164]
Department of Correspondence
The Diwan-i-Risalat or Correspondence Department, works like "the repository of secrets". Şahib-i-Diwān-i-Risalat, was the head of the Correspondence Department. The chief officer's tasks were to write Sultan's letters to the Caliph, foreign princes, local governors and foreign empires. The office hours were from 9 or 10 o'clock in the morning to 3 pm in the afternoon. Tuesday and Friday were observed as holidays.[165]
Department of Secret Intelligence
The Department of Secret Intelligence was called Dīwān-i-Shughl-i-Ishrāf-i-Mamlukat. Sultan Mahmud had numerous spies (called mushrifs) across his empire, supervised by the special department within his diwan. Persons of both male and female served as spies and travelled to foreign lands in disguise to collect useful information for the Sultan. A team of spies (Mushrifān-i-Dargah) kept eyes on the activities of the ministers, princes and courtiers. When the Sultan sent verbal order to an officer, he used to send two men, one of them being a mushrif on the other, to guarantee that the message and its reply were correctly delivered.[166]
News and Postal System
To transfer news and reports of spies, there was a regular official postal service throughout the empire. The Şāhib-Barīd or Master of the Post at the headquarters of every province was the official news writer whose duty was to inform every important detail to the sultan.[167]
Comptroller of the Households
The Şahib-i-Diwān-i-Wikālat, or the Comptroller of the Household's duty was to manage the Royal Kitchen, the Royal Stables, and the numerous staff attached to the Sultan's palace. The Wakil was also in charge of the private treasury of the Sultan, and distributed rations and salaries to his personal staff and his bodyguards.[168]
Justice System
The justice system employed Qadis just like every other Muslim empires. Qadis are expert on the knowledge of Muslim Law. Every province had a Qadi'l-Qudāt or Chief Qadi. The Qadis is said to have power over the “life and properties of Muslims”. They themselves were the judge and the law. The parties and evidences were carefully considered and judgement was given. If a Qadi misconduct his duties the Sultan himself investigated the issue and dismissed the offender.[169]
Provincial Government
There were three important branches of administration in a Ghaznavid province: civil, military, and judicial. The highest military officer in the province was the commander of the provincial army.[170]
Administration of Towns
Every town was protected by a fort, and the commander of the fort, called Kotwāl who was also the chief military officer in the locality. The chief civil officer in a town was the Muhtasib or Shihna who kept peace and order, monitored unadulterated food supply, legal standard of measurement, free trade. Also the Muslim Law regarding public morality was supervised by him. Criminals were sent to the Amir-i-Haras or the Chief Jailor, for safe custody till they were brought for trial before the Qadis. Religious and educational endowments in each town were administered by a separate office called Ishraf-i-Awqaf.[171]
Patronage of arts
Mahmud was a patron of literature, especially Persian 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.[172] According to Dawlatshah, Mahmud had 400 poets in his court.[173] The Sultan himself was a poet and scholar. It is said he was the author of Fiqh work named Tafridu’l Furu.[174]
Mahmud patronized the notable poet Ferdowsi, who after labouring 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.[citation needed]
After the successful invasion of the Doab in 1018, Mahmud founded a Friday Mosque in Ghazni known as the 'Bride of Heaven'. Mahmud’s founding of the mosque and college at Ghazni inspired his nobles, who raised mosques, colleges, and hospices on every side.[175]
Legacy

Obverse in Arabic: la ilaha illa'llah muhammad rasulullah sal allahu alayhi wa sallam "There is no God except Allah, and Muhammad is the messenger of Allah"
Reverse in Sanskrit (Sharada script): avyaktam eka muhammada avatāra nrpati mahamuda "There is one Invisible; Muhammad is the avatar; the king is Mahmud".[176][177][178][179]
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,[180] 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.[181]
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 known as Muhammad of Ghori captured the last Ghaznavid stronghold at Lahore in 1187.[citation needed]
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.[182][183]
In honor of Mahmud of Ghazni, the Pakistan Armed Forces named a short-range ballistic missile the Ghaznavi.[184] In 2021, Taliban leader Anas Haqqani tweeted praising Mahmud of Ghazni labelling him as a "renowned Muslim warrior & Mujahid of the 10th century" who "established a strong Muslim rule in the region from Ghazni & smashed the idol of Somnath".[185][186]
Personality and views
Sultan Mahmud thought of himself as "the Shadow of God on Earth".[187] During the seventh year of his reign, Mahmud mintage from Lahore styled him as "Mahmud butshikan" (Mahmud the breaker of Idols).[188] He was a pious Muslim with complete faith in his religion. He always prayed before battles and, in difficult moments, relied on God's promise in the Quran to aid and grant victory to the faithful.[189]
He was a man of medium height, and of a powerful and symmetrical build. He had a fine complexion, handsome face, small eyes and a firm, round chin which was covered with a scanty beard.[190] Spot marks of smallpox had covered his entire face.[191] Despite following Muslim code of morality, he occasionally indulged into drinking.[192] He possessed ordinary physical strength, but he could handle the hardships of war. Although he enjoyed comfort and avoided unnecessary risks during war time, he was still brave enough to charge the enemy on an elephant when needed.[193]
Following Mahmud's recognition by the Abbasid caliphate in 999, he pledged a jihad and a raid on India every year.[194][195] In 1005 Mahmud conducted a series of campaigns during which the Ismailis of Multan were massacred.[196] When punishing heretics with death, he acted only after proper examination and consultation with orthodox Islamic scholars i.e Qadis, not on mere suspicion.[189] Sayed Suleman Nadvi states that his military campaigns resulted in greater losses among Muslims than Hindus, as he engaged in twenty-three major conflicts against Muslim adversaries compared to twelve against Hindu opponents.[197]
Mahmud used his plundered wealth to finance his armies which included mercenaries. Indian soldiers, who historian 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 and ceremonies.[198] Thapar asserted that the sack of Somnath was a political act and was perceived by the contemporaries in same manner.[199] Indian soldiers under their commander Suvendhray remained loyal to Mahmud. They were also used against a Turkic rebel Ahmad Inaltigin, with the command given to a Hindu named Tilak according to Bayhaqi.[200] His expeditions reportedly involved no slaughter or molestation of women. He loved justice and hated oppression so intensely that he would even execute his own son if caught in adultery.[201]
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.[202]