Wars against the western front Battle of Peshawar (1001) 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.
Siege of Bhatiya 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.
First campaign of Multan 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.
Battle of Chach 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.
Capture of Narayanpur 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.
Annexation of Multan 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.
Other campaigns Capture of Thanesar 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.
Battle of Nandana 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.
Siege of Lohkot 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.
Capture of Kannauj, Mathura, Mahaban, Bari, Asi, Sirsawa 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.
Capture of Gwalior 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.
Capture of Kalinjar 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.
Conquest of Lahore In 1022, Lahore was captured after defeating Trilocanapala. The entire region of Punjab up to
Sutlej was annexed to the Ghaznavid Empire. == Later conflicts ==