# Ghaznavid invasions of Kannauj

The Ghaznavid invasion of Kannauj or the siege of Kannauj in 1018 was a military campaign conducted by Mahmud of Ghazni, the then ruler of the Ghaznavid Empire, against the Pratihara dynasty. During this siege, the Pratihara ruler, Rajyapala, eventually surrendered to Mahmud of Ghazni, thereby accepting nominal suzerainty under his rule. This event marked the decline of the Pratihara dynasty's power. In the aftermath of his surrender to Mahmud, Rajyapala met his demise at the hands of the Chandela ruler, Vidhyadara, for capitulating to the Ghaznavid conqueror.
After the decline of the Pratihara dynasty, the Rashtrakutas rose to prominence in Kannauj. Their fourth ruler, Gopala, was defeated and Kannauj was plundered by the Ghaznavid governor of Punjab named Mahmud who was the son of Ibrahim of Ghazni. Subsequently, Kannauj came under the control of the Gahadavala dynasty, whose ruler, Madanapala, was defeated by Masud III and imprisoned by the Ghaznavids. He was later released upon payment of ransom by his son, Govindachandra.

## Background

Mahmud of Ghazni, as the ruler of the Ghaznavid Empire, conducted a series of invasions into India. One of his notable campaigns was the invasion of Kannauj, which was the capital of the Pratihara dynasty. Prior to reaching North India, he first defeated the Hindu Shahis of Afghanistan and various other regional monarchs in northern India.
In 1018, Mahmud of Ghazni, led an expedition from Ghazni with the aim of capturing Kannauj from the Pratihara dynasty. Kannauj held strategic significance, being at the crossroads of power for the Pala dynasty, the Pratihara dynasty, and the Rashtrakutas. These dynasties had been vying for control of Kannauj, but in 1018, the ruler of the Pratihara dynasty, Rajyapala, held dominion over the city.
On his journey to Kannauj, Mahmud captured Bulandshahr and Mahaban after defeating their rulers. He also entered Mathura and looted its vicinity.

## The invasion

In January 1019, Mahmud of Ghazni reached Kannauj. Surprisingly, Rajyapala, the ruler of Kannauj, offered no resistance and fled his capital by crossing the Ganga River, ultimately seeking refuge in Bari. In his absence, Ghaznavid forces ransacked Kannauj, seizing a substantial amount of plunder.
Ultimately, Rajyapala, after fleeing to Bari, decided to surrender to Mahmud, acknowledging the nominal suzerainty of the Ghaznavids. The seven forts of Kannauj fell in one day to the Ghaznavids. Following this development, Mahmud engaged in other campaigns within India after successfully asserting control over Kannauj.
Rajyapala's surrender to the Ghaznavids had consequences, leading to some turn of events. The Chandela ruler Vidyadhara, along with his allies, took matters into their own hands and killed Rajyapala. Meanwhile, Mahmud of Ghazni continued his campaign, capturing the fort at Munjhawan, a stronghold held by Brahmins. These actions effectively marked the end of the Pratihara dynasty. After Rajyapala's demise, his successors persisted in maintaining control over certain territories by relocating their capital to Bari, near Kannauj, until their domain was eventually conquered by the Gahadavala Rajputs.

## Later campaigns

Following Mahmud's second campaign in the Gangetic valley, a Rashtrakuta prince named Chandra founded himself at Kannauj in 1027. The fourth ruler in his lineage was a king named Gopala.
Between 1086 and 1090, Mahmud, the son of Ibrahim of Ghazni and the governor of Punjab under the Ghaznavid rule, launched another invasion of Kannauj. He plundered both Kannauj and Kalinjar, and also attacked Ujjain. During this campaign, he defeated Gopala, then formed an alliance with the Gahadavala king named Chandradeva. After Mahmud's departure from northern India following his victory over Gopala, Chandradeva seized the throne of Kannauj from Gopala. The Gahadavala king levied a tax named Turushkadanda on the people to make annual tribute payments to the Sultans of Ghazni. It was likely to ensure the consistent payment of this tribute that Muslim expeditions were periodically launched against Northern India.
Later, Madanapala, who ruled as the Gahadavala monarch from 1100 to 1114 and was the son of Chandradeva, was defeated by the Ghaznavid ruler Masud III and taken as a prisoner of war. He was released after his son Govindachandra, who ruled from 1114 to 1154, paid his ransom, as indicated by the Gahadavala inscriptions.