Abu al-Qasim Mahmud ibn Sabuktigin (; 2 October 971 – 30 April 1030), commonly known as Mahmud of Ghazni or Mahmud Ghaznavi (), was the Sultan of the Ghaznavid Empire, ruling from 998 to 1030. Mahmud was known by his honorific title Yamin al-Dawla (, ). 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 and Khwarazm in Transoxiana.
Highly Persianized, Mahmud continued the bureaucratic, political, and cultural customs of his predecessors, the Samanids. He 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. He laid the foundation of Muslim rule into core of the Indian subcontinent. As a champion of Sunni Islam, Mahmud waged war against the non-Muslim states in Indian subcontinent as well as Shi'a states within his empire and bordering regions of Iran. In the thirty-two years of his reign, he made thirty-five major and eleven minor campaigns and reputed to be undefeated throughout his entire military career.
Mahmud 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.
Birth and background Mahmud was born in the town of Ghazni in the region of Zabulistan (in present-day Afghanistan) on 2 October 971. His father, Sabuktigin, was a Karluk Turkic slave 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, a Farighunid princess, 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. The marriage was sealed in 1000 AD. He also had three brothers viz. 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.
In 1015–16, Mahmud married his own sister Hurra Kalji to the Khwarazmshah Ma'mun II. 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 Sayyid Salar, whose son was Sayyid Salar Mas'ud. Mahmud's companion was a Georgian slave, Malik Ayaz, about whom poems and stories have been told.
Issues He had seven sons and three daughters: 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. Second daughter, married to the Ziyarid ruler Manuchihr. Third daughter, married to the Ziyarid ruler Kaikavus.
Early career
In 977–8, when Sabuktigin left for his expedition to Bust (now Lashkargah in southwestern Afghanistan), he appointed the boy Mahmud as his lieutenant in Ghazni. 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 Khassa. Sabuktigin recognised his services and bestowed him the title of Saifu'd-Dawlah () and appointed him to the command of the troops of Khorasan 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 CE, 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 Khorasan. After Subuktigin's death Mahmud returned to Ghazni to contest the throne with his brother Ismail.
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. 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. He accended the throne at the age of 27. That year, in 998, Mahmud then travelled to Balkh and paid homage to Amir Abu'l-Harith Mansur b. Nur II. He then appointed Abu'l-Hasan Isfaraini as his vizier.
Conquest of Khorasan
After accession to the throne, the Samanid Amir Mansur II confirmed Mahmud the possession of Ghazni, Bust, eastern Khorasanian towns of Balkh, Tirmidh, and Herat but he was eager to recover Khorasan. 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. The Oxus River was decided as the borders between the two empires.
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 (). The caliph also conferred upon him the title of Yamīn al-Dawla wa Amīn al-Milla ()
Conquest of Sistan
Khalaf ibn Ahmad (), 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. 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.
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. 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. In October 1010, Mahmud launched a decisive expedition and successfully subdued Multan.
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.
Campaigns in the Indian subcontinent
War against the Hindu Shahis (1000–1027)
After Sabuktigin's death in 997 Mahmud succeeded his father. In September 1000 AD, he conquered and annexed Bannu and Waziristan, part of the Hindu Shahi kingdom. There he captured many forts and appointed his own governors. No resistance is recorded from Jayapala or the Hindu Shahis. On 28November 1001, his army fought and defeated the army of Raja Jayapala of the Kabul Shahis at the Battle of Peshawar and Battle of Hund. 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. In 1005 Mahmud conquered Bhatia, and Multan in 1006, at which time Anandapala's army attacked him at the Indus. Anandapala suffered defeat in the engagement. In 1008, Mahmud attacked and crushed the Hindu Shahi rebel Sukhapala at Multan.