The Ghaznavid campaigns in India refer to a series of military expeditions lasting over two centuries launched by the Ghaznavid Empire, a prominent empire of the 10th and 11th centuries. They went to the Indian subcontinent, led notably by Sultan Mahmud of Ghazni (), leaving a profound impact on the region's history and culture. Conflicts continued until the fall of Ghaznavids in late 12th century.
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 10th 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.
This list details the military conflicts between the Ghaznavids and Indian kingdoms.
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.
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.
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 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.
The first Battle of Laghman took place in 988 near present-day Laghman, Afghanistan, between Jayapala and Sabuktigin. The 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.
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, 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.
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 was in the face of a humiliating defeat, he immolated himself.
In 1004 CE, Mahmud invaded the Kingdom of Bhatia (Bhatiya) 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 was 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.
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 Tomaras of Delhi. The Tomara king sent appeals for assistance to other neighboring kings, but Mahmud successfully captured the city in 1014, 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, 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. 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, 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 which was surrounded by dense jungle. Its ruler Chandrapal Bhur fled from his territory and the Sultan captured five of his forts. By the Sultan's order, the fort was plundered and the garrison were either imprisoned or 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.
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 died 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.
In 1022, Lahore was captured after defeating Trilocanapala. The entire region of Punjab up to Sutlej was annexed to the Ghaznavid Empire.
In 1026, Mahmud led an army of 80,000 men on a campaign to plunder the Somnath temple. Rajput forces opposed his army at Somnath, 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.
Mahmud died in 1030, succeeding Mas'ud () to the throne. In 1031 Mas'ud appointed Ahmad Niyaltigin governor of the Punjab. In 1033 MasâÂÂud captured the fortress of Sarsuti or Sarwasa. In 1034, Ahmad led campaigns against Indian chieftains, compelling the Thakurs to pay tribute. He crossed the Ganges River, traveled along its left bank, and reached Banaras, part of the Kalachuri king GangeyadevaâÂÂs () realm. There, he plundered the markets returned to Punjab with a substantial haul of gold, silver, and jewels. In 1036 CE, MasâÂÂud appointed his second son, Majdud, as governor of Punjab who occupied the territories in the Indus valley and its tributaries as far east as Hansi and Thanesar. The following year, Masud assembled a large army. He then marched to Punjab, camping along the Jhelum River near Dinarkotah. From there, he advanced to Hansi in the Hisar District, Punjab, and besieged its fort. After a fierce battle, Hansi was captured. He then proceeded to Sonipat, defeating its governor, Dipal Har. Continuing his campaign, MasâÂÂud approached the kingdom of Ram Rai, who avoided conflict by offering valuable gifts.
Mas'ud was killed in the fort of Giri in 1040 AD by his slaves who declared Muhammad as the new ruler. Mas'ud son Mawdud () hearing the news of his father's death dethroned and executed Muhammad. Muhammad's rule only lasted four months before Mawdud's accession. Mawdud nominated Faqih Salti as the governor of Lahore. The news of Mas'ud's death opened the opportunity to Indian rulers to attack the Ghaznavids. Sandanpal the grandson of Hindu Shahi dyansty attacked Lahore with a coalition of various Indian rulers. Faqih Salti's army defeated the coalition killing Sandanpal. In 1043 CE, three Indian kings under the leadership of Mahipal of Tomara launched offensives against Ghaznavids. The coalition possibly consisted of Paramara king Bhoja, Kalachuri Lakshmikarna and Anahilla captured Hansi, Nagarkot, Thanesar and other dependencies at last besieged Lahore. After seven months of unsuccessful siege the garrison of the fort inflicted defeat on the allied army forcing them to desert the battlefield. In 1048, Maudud dispatched Abu Ali Hasan, the kotwal of Ghazni, with an army to suppress rebellious Indian chiefs. After subduing the insurgents in Punjab, Abu Ali advanced to the fort of Mahitah, near Kashmir, and captured it.
In 1052 AD, Sultan Abd al-Rashid's general Nushtigin managed to recapture Nagarkot which had been in the possession of Hindus since 1043.
Contemporary Ghaznavid poets wrote poems commemorating victories of Ibrahim of Ghazni () and his two son Saif-ad-Daula Mahmud and Mas'ud, who later became the Sultan. In 1079, Ibrahim led various campaigns against Indian chiefs and conquered Tabarhindah, Burya on the Yamuna in Ambala, Dhangan, Jalandhar, Ajudhan, and Rupal on the summit of a hill, and reduced the fort of Darah, in the neighbourhood of Rupal.
In 1075 AD, Ibrahim appointed Saif-ad-Daula Mahmud as the governor of Indian territories. He led campaigns into Uttar Pradesh and in Central India. Between 1070-1086 AD, Mahmud leading a army of Ghazis with 40,000 cavalrymen penetrated into Uttar Pradesh in modern India. The Ghaznavids laid siege on the fort of Agra. Raja Gopala of the Rastrakuta dynasty offered resistance. After few days of fierce combat the fort was captured. Several local rulers submitted and brought treasures and elephants for Mahmud. He then captured Kannauj. According to the 12th century text Diwan-i-Salman, a man named Chand Rai was left in charge of the elephants. One theory identifies Chand Rai as the Gahadavala king Chandradeva, and postulates that he entered into friendly relation with Mahmud, or became his tributary. However, no concrete evidence supports this theory. Mahmud also invaded Ujjain, but was repulsed by the Paramara Lakshmadeva. He also invested the fort of Kalanjara, which was then ruled by the Chandella Kirttivarman
Ibrahim succeeded Ala ad-Dawlah Mas'ud III () in 1099 AD. Hajib Tughatigin, an officer under the Sultan, crossed the Ganges and carried on conquest in India. King of Kannauj who was probably Madanapala () of Gahadavala dynasty was captured by the Sultan's army. Madanapala's son Govindachandra () defeated the Ghaznavids releasing his father from captivity. In 1112 AD, Muhammad Bahlim captured Nagaur from Chauhan ruler Ajayaraj II.
During the reign of last Ghaznavid Sultan Khusrau Malik (), Vigraharaj IV retook Hansi from the Ghaznavid Sultan of the Punjab. An inscription of his nephew and his successor records that Prithviraja II fortified it as an outpost against the Ghaznavids in 1167. A few years later, Prithviraja II sieged Bhatinda, and thus shifted the Chauhan frontier in the north to modern Ferozepore. Khusrau Shah's slothful reign allowed his generals to exercise their power independently, often carried out raids deep into Indian territories bringing valuable spoils.
The raids in late 11th century, were not highly impactful, but the Rajput kings recognized their threat, as evidenced by the Turushkadanda tax mentioned in grants by Gahadavala rulers Chandradeva (), Madanapala (), Govindachandra (), and Vijayachandra () likely used to counter or appease the Ghaznavids.