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. 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, 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. in 998 AD.
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. 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'' "Friend of the Commander of the Faithful".
Conquest of Sistan in 1003 CE.
Jami al-Tawarikh, 1314 CE.
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.
Campaigns in the Indian subcontinent , Herat, 1425).
brought to Sultan Mahmud of Ghazni. Folio from Majmu al-Tavarikh'', by
Hafiz-i Abru, Herat, 1425.
War against the Hindu Shahis 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 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, 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. 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. 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. In 1014, the
fort of Nandana was captured after defeating Hindu Shahi and
Lohara regiments under Bhima the son of Trilocanapala () and Tunga prime minister of
Sangramaraja () in the
Battle of Nandana. 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. 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. He also vowed to raid and loot the wealthy region of north-western India every year.
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. 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.
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. On 2 December 1018, crossing
Yamuna, the fort of
Sirwasa was besieged and captured. 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. 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. 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. 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. 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. On the return to Ghazni, Mahmud besieged and captured the fort of Munj. 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. 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. 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. 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. 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. 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 () by '
Abd al-Hayy Gardizi and Tabaqat-i-Akbari by
Nizamuddin Ahmad and Firishta's writings also mention this incident. He reached
Mansura, capital of
Soomra dynasty of Sindh. Its ruler Khafif escaped into the Jungles. The city was sacked and burnt. Sindh paid tribute from 1026 till his death in 1030 AD. 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. 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. He raided India in
Gurjara-Pratihara territory which included
Somnath,
Mathura and
Kannauj. Indian historian,
Kishori Saran Lal, estimates Mahmud's invasions into India caused a population loss of 2 million people killed and enslaved. In total, he invaded India seventeen times and plundered the richest cities and temple towns, using the booty to build his capital in Ghazni.
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. 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.
Conquest of Qusdar ) in Balochistan. ''
Jami' al-Tawarikh''The kingdom of
Qusdar, situated roughly to the north-eastern half of modern
Balochistan. Qusdar became dependency of Ghazni during the first years of Sabuktigin's reign. 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.
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.
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.
Conquest of Kafiristan Sultan Mahmud upon learning that the valleys of the Nur and Qirat rivers, 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.
Campaigns in Transoxiana In 1023 AD, Arslan Khan () 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. 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. 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:
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. 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.
Persian campaigns In 1012, Mahmud secured dominance over
Ziyarids in Northern Persia. 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. The Ghaznavids then subjugated the neighbouring kingdoms in
Azerbaijan, and Northern Iran with
Rawadids and
Sallarids paying tribute. ==Last days==