Jayapala

Jayapala was a ruler of the Hindu Shahi dynasty from 964 to 1001 CE. He ruled over the area which stretched from Laghman in the west, to Kashmir in the east and from Sirhind to Multan. He was the son of Hutpal and the father of Anandapala. Epithets from the Bari Kot inscriptions record his full title as "Parama Bhattaraka Maharajadhiraja Sri Jayapaladeva".

History
After three centuries of unremitting effort, the Arab/Turkic dominion in India at the end of 950 was limited to two states, Multan and Mansura. The city of Kabul was under the command of Sabuktigin, however, the Hindu Shahi rulers stationed at Udabhandapur had been making continuous effort for regaining control of Kabul.

In 986–987, Jayapala marched towards Ghazni and met with Sabuktigin's forces at Ghuzak. The war remained largely inconclusive for days before the tide turned against the Shahis: Jayapala was forced to propose a peace treaty. Mahmud, son of Sabuktigin and a battle commander, wished to inflict a decisive defeat, but had to concede when Jayapala threatened to incinerate all valuables. A war indemnity of one million Shahi dirhams and fifty war elephants was agreed upon and some frontier forts were ceded to the Ghaznavids. Accordingly, Jaypala made his way back with a few Ghaznavi commanders who were to take charge of the ceded forts, while some of his relatives and officials were left with Sabuktigin as hostages. Once Jayapala reached his own territories, he called off the treaty and threw the commanders into prison, probably hoping to force Sabuktigin into exchanging hostages.

Sabuktigin refused to believe the treaty had been breached, but once it was established beyond doubt, he plundered the frontier town of Lamghan: temples were demolished and houses burnt down. In response, Jayapala secured troops from unidentified Rajahs, and met with the Ghaznavids near Kindi (modern day Kandibagh - ?). The Ghaznavids breached the enemy lines repeatedly using light attacks and followed them with an all-out assault, routing the Shahis who had to flee beyond the Indus despite their overwhelming numerical superiority. The entire span of territory up to Peshawar was lost, and Sabuktigin installed his own tax-collectors; local tribes were ordained into Ghaznavid arms too. A ribāṭ was commissioned at Kindi to commemorate the victory. However, Peshawar and adjacent regions returned to Shahis sometime soon, probably during what would be a long interlude in the Ghaznavid-Shahi conflict.

Circa 990–991, Mahmud would be imprisoned by his father Sabuktigin on grounds of fomenting a rebellion. Jayapala probably tried to leverage the rift in his favor by promising to rescue Mahmud, marry off his daughter to him, and further, allot sufficient wealth and troops. Mahmud did not respond favorably and noting the Shahi to be a doggy infidel, proclaimed his absolute devotion to Sabuktigin and pledged to attack Jayapala upon release. Around the same time, Jayapala was challenged by Bharat, a Rajah of Lahore who wished to wrest control of Nandana, Jailam and Takeshar. Anandapala, then Governor of Punjab, was ordered to intercept Bharat's forces and in the ensuing battle, Bharat was imprisoned and Lahore annexed; however the nobility of Lahore pleaded on behalf of their old King, who was reinstated as a feudatory after payment of tributes. About a year hence, Bharat's son Chandrak deposed him on the grounds of waging an ill-thought campaign against the Shahis, and became the new feudatory. For reasons which are not clear, c. 998-999 (eight years after the usurpation), Jayapala declared war against Lahore on the pretext of protecting his suzerain Bharat and dispatched Anandapala. Chandrak was ambushed and kidnapped around the battleground of Samutla, and Lahore was annexed by the Shahis. Rahman speculates that the Shahis were trying to balance their losses against the Ghaznavids using any pretext.

In 998, Mahmud ascended the Ghaznavid throne at Ghazni, and went on an annexation spree. Soon, Mahmud turned his eyes on the Shahis, allegedly resolving to invade their territories every year. In what was the last battle of his life, Jayapala met with Mahmud at Peshawar on 27 September 1001; one Shahi governor of Bardari province named Adira Afghan is held to have switched sides and aided in the safe and quick passage of Mahmud's troops across Shahi provinces. Mahmud saw through Jayapala's tactics of delaying the conflict in the hope of receiving reinforcements and declared war immediately. Soon, the Shahis were in a state of disarray with Jayapala and fifteen of his relatives taken as prisoners. About one million Shahi forces were taken as slaves. The war-spoils awed contemporary chroniclers: the royal necklaces alone were valued at over six million Shahi dirhams. Mahmud continued his raid as far as Hund, as his forces chased fleeing troops and decimated pockets of resistance. Within a few months, the entire Shahi territory to the west of the Indus had submitted to Mahmud. By April 1002, Mahmud was on his way back to Ghazni.

Jayapala was eventually released but Muslim chroniclers differ about the specifics. Unsuri, a court-poet of Mahmud notes that he was sold in the slave market; Minhaj ad-din and al-Malik Isami add a price of 80 dirhams/dinars. Others like al-Ansab note that Mahmud had rejected his request for pardon but allowed him to be free in lieu of a payment of 2.5 million dirhams and 50 war-elephants around March 1002, which Rahman finds more likely. Jayapala returned to Hund and immolated himself in a pyre after abdicating the throne in favor of Anandapala.

The conquest between Hindu Shahi Kings and Ghazni kings stretched fifteen years before the latter finally succeeded in establishing rule in the region of Afghanistan and modern Pakistan including cities of Kabul.

Succession
Jayapala was succeeded by his son Anandapala, who along with other succeeding generations of the Shahi dynasty took part in various campaigns against the advancing Ghaznavids for decades successfully keeping them from crossing the Indus.