# Ghaznavid campaigns in India

The Ghaznavid campaigns in India refer to a series of military expeditions lasting 54 years (973–1027) launched by the Ghaznavid Empire, a prominent empire of the 10th and 11th centuries. They went into the Indian subcontinent, led primarily by Sultan Mahmud of Ghazni (r. 998–1030), leaving a profound impact on the region's history and culture.
Beginning in the late 10th century, these incursions marked a significant chapter in the history of South Asia, with Ghaznavid forces penetrating deep into the Indian subcontinent, including the Punjab region and northern India. The primary objectives of these campaigns included the acquisition of wealth, the propagation of Islam, and the establishment of Ghaznavid rule in the region.
By the end of the tenth century, the Ghaznavid ruler Sabuktigin captured the region between Laghman and Peshawar from the Hindu Shahi ruler Jayapala. This laid the foundation for the Ghaznavids to establish their dominance over parts of present-day Afghanistan and India. The Ghaznavid campaigns in India serve as a crucial historical backdrop to the later Islamic empires that would shape the subcontinent's destiny.

## Campaign timeline

This list details the military campaigns conducted by the Ghaznavids in India.
| Name Of Conflict (Time) | Ghaznavid commander | Opponent | Outcome |
| Battle of Charkh (973) | Sabuktigin | Lawik dynasty and Hindu Shahis Abu Ali Lawik † | Ghaznavid Victory Abu Ali Lawik was killed in battle. |
| First Battle of Laghman (988) | Sabuktigin | Hindu Shahis Jayapala | Ghaznavid Victory Jayapala signs a treaty with Ghaznavids. |
| Second Battle of Laghman (991) | Sebuktigin | Hindu Shahis and Rajput confederacy Jayapala | Ghaznavid Victory Hindu Shahis and Rajputs forced to retreat. |
| Battle of Peshawar (1001) | Mahmud of Ghazni | Hindu Shahis Jayapala (POW) | Ghaznavid Victory Jayapala taken as prisoner. Much of Gandhara was annexed into Ghaznavid Empire |
| Capture of Bhera (1004) | Mahmud of Ghazni | Kingdom of Bhatia Biji Rai (POW) | Ghaznavid Victory Biji Rai was captured and immolated himself. |
| Battle of the Indus River (1006) | Mahmud of Ghazni | Hindu Shahis Anandapala | Ghaznavid Victory Anandapala retreats to Kashmir. |
| Capture of Multan (1006) | Mahmud of Ghazni | Lodi dynasty of Multan Fateh Daud | Ghaznavid Victory Fateh Daud surrenders. |
| Battle of Multan (1007) | Mahmud of Ghazni | Hindu Shahis Sukhapala (POW) | Ghaznavid Victory Sukhapala was captured as prisoner. |
| Battle of Chach (1007) | Mahmud of Ghazni | Hindu Shahis Anandapala | Ghaznavid Victory Gandhara annexed to Ghaznavid empire. |
| Capture of Narayanpur (Rajput state) (1009) | Mahmud of Ghazni | Rajputs of Narayana and Hindu Shahis King of Narayana Anandapala | Ghaznavid Victory Narayanpur annexed to Ghaznavid empire. |
| Recapture of Multan (1010) | Mahmud of Ghazni | Lodi dynasty of Multan Fateh Daud (POW) | Ghaznavid Victory Fateh Daud taken as prisoner. Rebellion suppressed. |
| Battle of Dera (1012) | Mahmud of Ghazni | Chief of Dera Rama | Ghaznavid Victory Mahmud proceeds towards Thanesar. |
| Sack of Thanesar (1012) | Mahmud of Ghazni | Tomara dynasty (offered no resistance) | Ghaznavid Victory Ghaznavids plunders Thanesar, obtains booty and returns to Ghazni. 200,000 captives taken as prisoner. |
| Siege of Lohkot (1015) | Mahmud of Ghazni | Lohara dynasty Sangramaraja | Lohara victory Mahmud withdraws from Kashmir because of heavy casualties and Winter storm. |
| Siege of Nandana (1016) | Mahmud of Ghazni | Hindu Shahis Trilochanapala | Ghaznavid Victory Fort of Nandana captured by Ghaznavids Trilochanapala retreat. |
| First Kashmir invasion (1016) | Mahmud of Ghazni | Hindu Shahis and Lohara dynasty Trilochanapala Tungh † | Ghaznavid Victory Ghaznavids managed to raid the surrounding areas of Kashmir Kingdom, but halted at Lohkot Fort Trilochanapala retreats to Kashmir. |
| Siege of Bulandshahr (1018) | Mahmud of Ghazni | Kingdom of Bulandshahr King Hardat | Ghaznavid Victory King Hardat fled from the fort. |
| Siege of Mahaban (1018) | Mahmud of Ghazni | Kingdom of Mahaban Kulchand | Ghaznavid Victory Kulchand commits suicide. |
| Plunder of Mathura (1018) | Mahmud of Ghazni | Tomara dynasty (offers no resistance) | Ghaznavid Victory Ghaznavids plunder Mathura. The 50,000 Hindus were killed by drowning or by using swords, the massacre was accompanied by the destruction of 1,000 temples in the district. |
| Ghaznavid invasion of Kannauj (1018) | Mahmud of Ghazni | Gurjara-Pratihara dynasty(Rajputs) Rajyapala | Ghaznavid Victory Rajyapala surrenders Gurjara Pratihara accepts nominal suzerainty of Ghaznavids. |
| Capture of Munjhawan (1018) | Mahmud of Ghazni | Brahmins | Ghaznavid Victory Munjhawan captured by Ghaznavids. |
| Capture of Asi Fort (1018) | Mahmud of Ghazni | Candrapala bhur | Ghaznavid Victory Asi fort successfully captured by Ghazni. Candrapala fled to hills. |
| Capture of Sirsawa (1019) | Mahmud of Ghazni | Hindu Chief of Sirsawa Chand Rai (POW) | Ghaznavid Victory Sirsawa plundered Chand Rai was captured. |
| Battle of the Rahib River (1021) | Mahmud of Ghazni | Hindu Shahis and Rajput confederacy Trilochanapala † Vidyadhara | Ghaznavid Victory Hindu Shahis and Rajputs retreats. Trilochandapala was killed in the battle. |
| Siege of Gwalior (1021) | Mahmud of Ghazni | Kachchhapaghata dynasty Kirthiraja | Ghaznavid Victory Kirthiraja surrenders Kachchhapaghata accepts the nominal suzerainty of Ghaznavids. |
| Siege of Kalinjar (1021) | Mahmud of Ghazni | Chandelas(Rajputs) Vidhyadara | Peace treaty. (Nanda) Vidhyadara submitted and offered valuable gifts to Mahmud. |
| Siege of Lohkot (1021) | Mahmud of Ghazni | Lohara Dynasty | Lohara Victory Mahmud retreats due to heavy casualties and Winter storm. Ghaznavids invasions halted in Kashmir. |
| Sack of Somnath (1026) | Mahmud of Ghazni | Rajput confederacy | Ghaznavid Victory Somanath temple plundered. 50,000 Rajputs were killed in the battle. |
| Battle of the Indus River (1027) | Mahmud of Ghazni | Jats | Ghaznavid Victory |
| Kalachuri invasion of Kangra (1034) | Ahmad Niyaltigin | Kalachuris of Tripuri | Kalachuri Victory Kangra valley annexed by Kalachuris from Ghaznavids. |
| Siege of Hansi (1043) | Mawdud of Ghazni | Tomara Dynasty Paramara Dynasty Mahipala Tomar Raja Bhoja | Tomara Victory Hansi annexed into Tomara dynasty |
| Blockade of Thanesar (1043) | Mawdud of Ghazni | Tomara Dynasty Paramara Dynasty Mahipala Tomar Raja Bhoja | Tomara Victory Thanesar annexed into Tomara dynasty |
| Blockade of Nagarkot (1043) | Mawdud of Ghazni | Tomara Dynasty Paramara Dynasty Mahipala Tomar Raja Bhoja | Tomara Victory Nagarkot annexed into Tomara dynasty |
| Siege of Lahore (1043) | Mawdud of Ghazni • Faqih Saliti | Tomara DynastyParamara Dynasty Kalachuris Mahipal Tomar Raja Bhoja Lakshmikarna | Ghaznavid Victory Rajput forces repelled by Ghaznavids. |
| Reconquest of Nagarkot (1052) | Nushtigin hajib | Tomara dynasty | Ghaznavid victory |
| Hejim-ud-din Invasion of India | Hejim-ud-din † | Chahamana dynasty Chamundaraja | Chahamana Victory Ghaznavid invasion halted |
| Conquest of agra (11th) | Mahmud of Punjab | Rashtrakutas of kannauj Gopala | Ghaznavid victory |
| Najm ad-Din Zarir's Raid against Malwa (1088–1092) | Najm ad-Din Zarir | Paramara dynasty Lakshmadeva | Paramara Victory Ghaznavid army turned its focus towards Kalinjar following difficulties in Malwa. |
| Mahmud's invasion of Kalinjar (Before 1090) | Mahmud of Punjab | Chandelas Kirtivarman | Chandela Victory Kalinjara was successfully defended |
| Expedition of Hajib Taghatigin into Chahamana Kingdom | HajibTaghatigin Imad-uddaulah Baguli Shah | Chahamanas of Shakambhari Prithviraja I | Chauhan Victory Ghaznavid Expansion halted |
| Ajayaraja's Conflict with the Ghaznavids | Salar Hussain | Chahamanas of Shakambhari Ajayaraja II | Chauhan Victory |
| Slaughter of Turushkas near Ajmer (1135-1150 CE) | Bahram Shah of Ghazni | Chauhan Dynasty | Chauhan Victory Massacre of Ghaznavid troops near Ajmer |
| Vigraharaja IV's first war against the Muslims (12th century CE(later half) | Khusrau Shah | Chauhan Dynasty | Chauhan Victory Vigraharāja annexed Hansi from the Ghaznavite Muslims |

## Under Sabuktigin

Sabuktigin was one of the slaves of Alptigin, the Governor of Ghazni. Alptigin was succeeded by his son Abu Ishaq and his slave, Bilgetigin, respectively. Following Bilgetigin's death in 972, another of Alptigin's slaves, named Boritigin, ascended to the throne.

### As a Ghazni subordinate
#### Battle of Charkh (973)

The first military conflict between Sabuktigin and the Indian kingdoms occurred in 973, when Abu Ali Lawik, the king of the Lawik dynasty, marched to invade Ghazni. Jayapala, the Hindu Shahi ruler, sent his son to support Lawik in this invasion. The battle took place near Charkh, in modern-day Afghanistan. Sabuktigin's forces defeated the combined armies of Lawik and the Hindu Shahis, resulting in the death and capture of many of their soldiers. Abu Ali Lawik himself was killed in the battle.

### As a Ghaznavid ruler

Sabuktigin ascended to the throne of Ghazni in 977, and embarked on a series of wars with Indian kingdoms in the late 10th century. His primary objective was to expand the influence of the Ghaznavid Empire in the Indian subcontinent. Sabuktigin's most remarkable military achievement was the conquest of the Punjab region. These conflicts with Indian kingdoms solidified the Ghaznavids as a formidable power in India and laid the groundwork for the more renowned invasions led by Mahmud of Ghazni in the subsequent century.
Initially, Sabuktigin faced opposition from Toghan and subsequently marched against him, leading to the capture of Kandahar and its surrounding areas. Sabuktigin also conducted raids in the territories belonging to Jayapala, which provoked Jayapala to launch an attack on Ghazni.

#### First Battle of Laghman

The first Battle of Laghman took place in 988 near present-day Laghman, Afghanistan, between Jayapala and Sabuktigin. Sabuktigin's Ghaznavid forces emerged victorious over Jayapala's Hindu Shahi forces. As a result, Jayapala, the Hindu Shahi ruler, was compelled to pay a substantial tribute to Sabuktigin and cede both territories and a few forts

#### Second Battle of Laghman

To avenge the defeat at Laghman, Jayapala orchestrated the formation of a confederacy comprising Hindu chiefs from the Tomara dynasty, Gurjara-Pratihara dynasty, Chahamanas, and Chandelas. This alliance was aimed at preparing for a pivotal battle. Jayapala amassed a substantial force, which included 100,000 cavalry and an immense contingent of foot soldiers. In 991 AD, Both forces met at Laghman. Seeing the disproportion of the manpower, Sabuktigin divided his troops into squadrons of 500 men each, and directed them to attack the enemy on one particular point. Ghaznavid forces again defeated the combined Hindu Shahi and Rajput forces.
Sabuktigin died in 997. He had increased Alptigin's domains to cover the area south of the Hindu Kush in Afghanistan and east to the Indus River in what is today Pakistan. His son Mahmud of Ghazni succeeded him.

## Under Mahmud of Ghazni

Mahmud of Ghazni succeeded Sabuktigin in 997. Mahmud of Ghazni's invasion of south Asia in the 11th century was a pivotal moment in the subcontinent's history. Mahmud, a powerful Turkic ruler, launched a series of raids into India between 1000 and 1027. His primary goal was to plunder the rich temples of northern India, most notably the famous Somnath Temple. These invasions left a lasting impact on the Indian subcontinent, both culturally and politically. While Mahmud's conquests were driven by a desire for wealth and power, they also led to the spread of Persian culture and the introduction of Islam in the region. His expeditions marked the beginning of a series of foreign invasions into India, ultimately shaping the course of its history for centuries to come.

### Against the western front

In 1001, the Ghaznavid forces, led by Mahmud of Ghazni, achieved victory over the Hindu Shahi forces, commanded by Jayapala, near Peshawar. Consequently, Mahmud incorporated Peshawar and Punjab into his empire. Jayapala, the Hindu Shahi ruler, was taken prisoner and, in the face of the humiliating defeat, immolated himself.
In 1004 CE, Mahmud invaded the Kingdom of Bhatia/Bhera and defeated its ruler, Biji Rai (also known as Baji Rao). The battle raged on for three days, resulting in heavy casualties for Biji Rai's forces. Ultimately, Biji Rai was compelled to retreat into the forest. The city came under siege and was eventually conquered by Sultan Mahmud's army. Biji Rai was captured by the Ghaznavids but chose to take his own life. Mahmud amassed significant wealth from this battle, including 120 elephants. Mahmud returned to Ghazni after this campaign.
In 1006, Mahmud led an expedition against Fateh Daud, the king of the Lodi dynasty of Multan. Daud had formed an alliance with Anandapala, the son of Jayapala, who had taken the throne after his father's death. Mahmud initially requested Anandapala to allow his army to pass through his territory, but Anandapala, being in alliance with Daud, refused. Consequently, Mahmud marched against Anandapala and defeated his forces near the Indus River. Anandapala was compelled to retreat to the mountains of Kashmir. Mahmud's forces plundered Anandapala's territories and took many soldiers as prisoners.
Mahmud continued his march towards Multan and, upon reaching the city, Fateh Daud surrendered it to him and agreed to pay an annual tribute. On his way back to Ghazni, Mahmud appointed a Hindu convert named Nawassa Shah (also known as Sukhapala) to oversee the Indian territories. Sukhapala happened to be the grandson of Jayapala.
In Mahmud's absence, Sukhapala reverted to Hinduism and revolted against him. Mahmud, upon hearing this, marched from Ghazni to Multan and defeated Sukhapala. Sukhapala retreated to the Salt Ranges but was eventually captured by the Sultan's forces and taken as a prisoner. Mahmud compelled Sukhapala to pay 400,000 dirhams and sentenced him to life imprisonment.
In 1008, Mahmud launched a campaign against the Hindu Shahis and defeated Anandapala in the Battle of Chach. This conflict likely arose from Anandapala's support of Daud during Mahmud's invasion of Multan. The Hindu Shahi troops retreated as far as the Kangra Valley, where they sought refuge.
In 1009, Mahmud embarked on an expedition against the King of Narayana, a Rajput vassal state of Anandapala. Anandapala intervened to aid his vassal but was ultimately defeated by Mahmud's Ghaznavid forces. This conquest allowed Mahmud to penetrate deep into the heartland of India.
In 1010, Daud staged another revolt against Mahmud. Mahmud responded by marching towards Multan, where he not only quelled the rebellion but also inflicted heavy casualties among heretics and took Daud as a prisoner. This action reestablished Mahmud's authority over Multan.
After experiencing a series of consecutive defeats, Anandapala opted to initiate a peace treaty with Mahmud. The terms of the agreement stipulated that he would annually pay a substantial tribute equivalent to the profits generated from his territories and the looting of his cities. Additionally, he committed to sending 50 elephants and 2000 well-trained armed personnel for military support. In exchange, the Sultan pledged not to launch any invasions into Anandapala's kingdom.

### Other campaigns

Despite his alliance with Anandapala, Mahmud of Ghazni continued his military campaigns in India. In 1012 CE, Mahmud marched from Ghazni to Thanesar with the intent to conquer and plunder the city. According to their treaty, Anandapala allowed Mahmud to pass through his territory but requested that the sacred city not be destroyed. Nevertheless, Mahmud continued his march toward Thanesar and encountered resistance from Rama, the chief of Dera, whom Mahmud defeated, allowing him to proceed further.
In 1012, Thanesar was under the rule of the Tomara dynasty. The Tomara king sent appeals for assistance to other neighboring kings, but Mahmud successfully captured the city, plundered it, and then returned to Ghazni.
Anandapala's death is not recorded in any chronicle; however, it can be ascertained to be c. late 1010 - early 1011. His son Trilochanapala succeeded him.
After the demise of Anandapala, Mahmud of Ghazni resumed his campaigns against the Hindu Shahis. In 1014 CE, he launched an expedition against Trilochanapala, who had settled in Nandana within the Salt Range. Trilochanapala attempted to defend the fort, but his forces were defeated by the Ghaznavid army, leading to the capture of the fort of Nandana. Trilochanapala fled to Kashmir to escape capture.
Mahmud pursued Trilochanapala into the Kashmir hills, pillaging villages along his path as he advanced towards Kashmir. This marked Mahmud's first invasion of Kashmir in 1015 AD. Seeking assistance, Trilochanapala turned to Sangramaraja, the reigning Lohara king of Kashmir, who promptly dispatched a substantial force led by his commander, Tungh, to support Trilochanapala. Initially, Tungh's forces won a skirmish against a small detachment sent by Mahmud. However, their overconfidence led them to engage in an open battle. Despite being outnumbered, Mahmud's Ghaznavid forces managed to defeat the Kashmiri forces. Trilochanapala retreated from the battlefield, and Mahmud plundered the frontier of the Kashmir valley before returning to Ghazni.
One of the notable event of Mahmud in his failed Kashmir campaign is the Siege of Lohkot in 1015. A fierce combat took place between the Lohara forces of Kashmir under Raja Sangramraja and the forces of Mahmud. At the end of the battle, Mahmud retreated back to Ghazni due to harsh winter conditions. The Loharas achieved victory.
In 1016, Mahmud launched another invasion of Kashmir, advancing until he reached the pass where the fort of Lohkot is located. Mahmud initiated a siege of the fort, but his efforts were interrupted by the onset of winter, accompanied by heavy snowfall. Consequently, Mahmud had to withdraw from the operation due to the adverse weather conditions.
In 1018 AD, Mahmud led an expedition against the Gurjara-Pratihara dynasty. Sultan Mahmud marched from Ghazni to Kannauj with a formidable army. Along his journey, he reached Bulandshahr, where King Hardat of Bulandshahr fled, leaving a garrison to defend the fort. The Ghaznavid forces defeated this garrison, and peace was secured with a payment of 1,000,000 dirhams and 30 elephants. Continuing his advance, Mahmud reached Mahaban. The king of Mahaban, named Kulchand, retreated to a dense forest and prepared for a battle. However, the forces of Mahaban were defeated by the Ghaznavids and many of them perished, some drowning in the river Yamuna. In a tragic turn of events, Kulchand took the life of his wife and then his own He subsequently launched an attack on Mathura. Although it was under the control of the Tomara dynasty, he did not encounter significant opposition. Mahmud plundered and devastated Mathura, leaving it in ruins. From Mathura, he advanced towards Kannauj. Upon his approach, Rajyapala, the Gurjar King, retreated to a location known as Bari. Kannauj fell easily to the Ghaznavids due to the lack of resistance. Eventually, Rajyapala surrendered to the Sultan. Mahmud then took control of Munjhawan, a Brahmin stronghold. The garrison put up a spirited defense against the invasion for 25 days but was ultimately defeated. Tragically, many of the defenders, along with their wives and children, chose to immolate themselves in the fire, while others leaped from the fort onto the battlefield, preferring death over dishonor. In the end, it was discovered that no one had survived within the fort.
Mahmud then advanced towards Asi, but its ruler Chandrapal Bhur ran away from his territory. By Sultan's order, the fort was plundered and the inhabitants were put to death.
In January 1019, Mahmud marched towards Sirsawa. Chand Rai, the Hindu chief of that region, prepared for battle. However, before the Sultan's arrival, Bhimpala, the son of Trilochanapala, advised him not to engage in a battle with Mahmud. Consequently, he fled from his fort, sought refuge on a hill, and concealed himself in a dense forest. Mahmud reached Sirsawa, plundered the fort, and then led his army into the forest, capturing Chand Rai.
   "Sultan Mahmud is not like the rulers of Hind and is not the leader of black men. It is obviously advisable to seek safety from such a person, for armies flee away before the very name of him and his father. I regard his bridle as much stronger than yours, for he never con- tents himself with one blow of the sword nor does his army satisfy itself with one hill out of a whole range. If, therefore, you design to contend with him, you will suffer; but do as you like-you know best. If you wish for your own safety, you will remain in concealment."
By the time, Rajyapala, the Gurjar ruler who surrendered to Mahmud was killed by the Chandela ruler Vidhyadara. In 1021, Mahmud marched from Ghazni with the intention of punishing Vidhyadara for his actions. However, he faced opposition from Trilochanapala on the banks of the Rahib River (either Yamuna or Ravi). Trilochanapala's army was defeated by the Ghaznavid forces, compelling him to retreat from the battlefield, resulting in the loss of many of his soldiers. Trilochanapala himself passed away shortly after the battle, and his son Bhimpala succeeded him.
Mahmud attacked the territories of Vidhyadara. He attacked the Gwalior fort in 1021 and forced its Kachchhapaghata ruler Kirthiraja to surrender. Kirthiraja accepted the nominal suzerainty of the Sultan and became a vassal of Ghaznavids. Kirthiraja offered thirty five war elephants to Mahmud.
Mahmud then directed his attention towards Kalinjar, where Vidhyadara had sought refuge after the Battle of the Rahib. The Sultan laid siege to the fort of Kalinjar, and after a fierce conflict, both parties opted for a peace treaty. Vidhyadara composed a poem praising Mahmud of Ghazni, and in a gesture of goodwill, Mahmud returned 15 forts to Vidhyadara as a part of the agreement.

### Sack of Somnath in Gujarat

In 1026, Mahmud of Ghazni led an army of 80,000 men on a campaign to plunder the Somanath temple. Rajput forces opposed his army at Somanath, but the Sultan's forces emerged victorious, with a devastating toll of 50,000 casualties among the defending army. The Ghaznavids looted the Somanath temple and destroyed its idols. This event earned Mahmud the title of 'The Idol Breaker' due to his actions during this campaign.
Mahmud defeated Jats near the Indus River in 1027.