Tripartite Struggle

The Tripartite Struggle, also known as the Kannauj Wars or the Kannauj Triangle Wars, for control of northern India took place in the ninth century, among the Gurjara-Pratihara Empire, the Pala Empire and the Rashtrakuta Empire.

Epigraphist Dineschandra Sircar however, added a different perspective to this struggle. According to Sircar, the struggle between the Gurjara-Pratihara and the Rashtrakuta had begun earlier than the struggle over Kannauj State. These two powers shared a common frontier in the Gujarat and Malwa regions. The frontier was a shifting one and far from permanent, causing enmity between the two powers. Even before the struggle over Kannauj started, Dantidurga, the founder of the Rashtrakuta Empire, had defeated Nagabhata I of the Gurjara-Pratihara dynasty, as evident from the Dashavatara Temple inscription of Dantidurga at Ellora and the Sanjan inscription of Amoghavarsha I, both belonging to the Rashtrakuta dynasty which states that Dantidurga (r. 735–756 CE) performed a religious ceremony at Ujjayani, and the king of Gurjara-desha (Gurjara country) acted as his door-keeper (pratihara), suggesting that the Rashtrakuta king had subdued the Gurjara-Pratihara king who was ruling Avanti at that time.

On the other hand, the conflict between the Pala Empire of Bengal and Bihar and the Ayudha dynasty of Kannauj was the continuation of an old power struggle that had started between Harshavardhana of the Pushyabhuti dynasty and Sasanka of Gauda in the seventh century and would continue till the twelfth century. These regional struggles were escalated to a greater pitch over the issue of succession of the Ayudha dynasty. Also, the involvement of the four powers, i.e. the Gurjara-Pratihara Empire, the Pala Empire, the Rashtrakuta Empire, and the Ayudha dynasty meant that it was actually a four-power. After the attempts of conquering Kannauj by Vatsaraja and Nagabhata II were foiled by Rashtrakuta Kings Dhruva and Govinda III, leaving the city under Pala control, The Gurjaras succeeded in finally capturing Kannauj during the reign of Mihir Bhoja, and the city remained their capital until the fall of the dynasty in 1036 CE.

History
Not much is known about the kingdom of the Kannauj after Harsha's death in 647 AD, so there is confusion regarding the absence of his heirs. For a short period, Kannauj came under the control of Arunasva. He attacked Wang Xuance, a Chinese ambassador sent to Harsha by Emperor Taizong of the Tang dynasty. However, Wang Xuance succeeded in capturing Arunasva, who was taken back to China to spend his days in attendance on the Tang Emperor.

In ~730, Yashovarman established a kingdom at Kannauj. His invasion of Gauda formed the subject of the Prakrit poem Gaudavaho (Slaying of the king of Gauda), composed by his courtier Vakpatiraja in the 8th century.

After Yashovarman, three kings — Vijrayudha, Indrayudha, and Chakrayudha — ruled over Kannauj between the close of the 8th century and the 820s. Attracted by the weakness of the Arusha rulers and the immense strategic and economic potentialities of the kingdom of Kannauj, the Gurjara-Pratiharas of Bhinmal (modern-day Rajasthan), the Palas of Bengal and Bihar, and the Rashtrakutas of the Manyakheta (Karnataka) warred against each other. This tripartite struggle for Kannauj lingered for almost two centuries and ultimately ended in favour of the Gurjara-Pratihara ruler Nagabhata II. He made the city the capital of the Gurjara-Pratihara state, which ruled for nearly three centuries.

Advent of The Palas
Dharmapala defeated Indraraja (or Indrayudha), the ruler of Kanauj, who was a vassal of the Pratiharas, and installed Charkayudha as his own vassal, then  held an imperial court at Kannauj, which was attended by the rulers of Bhoja (possibly Vidarbha), Matsya (Jaipur and north-east Rajasthan), Madra (East Punjab), Kuru (Haryana-Delhi-Western UP region), Yadu (possibly Mathura, Dwarka or Siṁhapura in the Punjab (Katas Raj Temples)), Yavana, Avanti, Gandhara and Kira (Kangra Valley). These kings accepted the installation of Chakrayudha on the Kannauj throne, while "bowing down respectfully with their diadems trembling". Some historians have speculated that all these kingdoms might have been the vassal states of the Pala empire but maintained their autonomy.

Vatsaraja and Dhruva
Pratihara king Vatsaraja defeated Dharmapala in a battle fought near Prayag. and occupied Kannauj. Vatsaraja himself was defeated by the Rashtrakuta king Dhruva, led to Vatsaraja taking refuge in the Thar desert region and temporary loss of his kingdom, while Dharmapala of the Pala Empire re-occupied Kanyakubja, but he was also defeated by Dhruva. After Dhruva returned to his Kingdom, Dharmapala recaptured Kannauj and placed his vassal Chakrayudha on the throne. Dharmapala became the most powerful ruler in North India, and declared himself as Uttarapathasvamin ("Lord of Northern India").

Nagabhata II and Govinda III
The Rashtrakutas power was weakened by a war of succession after Dhruva's death in 793 CE. Vatsaraja's son Nagabhata II restored the Pratihara kingdom and then conquered Kannauj, and made Chakrayudha his vassal, and assumed imperial titles - Paramabhattaraka, Maharajadhiraja, and Paramesvara after conquest of Kannauj. Nagabhata then marched east, and defeated Dharmapala near Munger. Nagabhata II was defeated by the Rashtrakuta king and Dhruva's son Govinda III before he could invade Bengal and had to retreat. Govinda III occupied Kannauj, and was acknowledged as overlord by both Chakrayudha and Dharmapala. Govinda III conquered the Lata (southern and central Gujarat) from the Pratihara dynasty and made his brother Indra the ruler of the territory, which in effect became a branch of the Rashtrakuta Empire. Malwa was also occupied, the Paramara dynasty became vassals of the Rashtrakutas in 800 CE, and the regions between Vindhyas and Malwa was incorporated in the Rashtrakuta domain.

After the departure of Govinda III, Dharamapala re established his authority over North India and remained the dominant ruler in North India till the end of his life, his son Devapala, and grandsons Mahendrapala and Shurapala I also maintained Pala dominance over North India and Kannauj until c865 CE.

Prathihara Capital and the End of the Struggle
Prathihara king Mihir Bhoja, grandson son of Nagabhata II, whose initial attempt to conquer Kannauj was defeated by Devapala, later defeated the Pala empire during the reign of Narayanapala, and made Kannauj the Prathihara capital. During the rule of King Mahendrapala I, son of Mihir Bhoja, the Pratihara empire reached its zenith, however the empire then slowly began to weaken from its constant struggle against the Arabs to the west, the Palas to the east and Rashtrakutas to the south of their domain. Rhastrakuta King Indra III occupied Kannauj from 914 – 916 CE  Mahmud of Ghazni sacked the city in 1018 CE, however, Kannauj remained under Pratihara dynasty control until the death of King Yashpala in 1036 CE.