The Hindu Shahi dynasty is now extinct, and of the whole house there is no longer the slightest remnant in existence. We must say that, in all their grandeur, they never slackened in the ardent desire of doing that which is good and right, that they were men of noble sentiment and bearing – Al Beruni

For 350 years, the Shahis stood tall and proud, protecting the gates of India from the Islamic hordes. But, they suddenly collapsed, exhausted. In a matter of 40 years, the Shahi Empire was non-existent. By the time Jayapaladeva’s career ended, the writing was on the wall. It’s a matter of time the Shahi Empire collapses. Anandapala, his son and successor was a wrong person on the throne – at a time when the Shahis required aggression and tact, he represented chivalry and passivity. But, he held the borders intact though the kingdom was severely plundered of it’s wealth. Mahmud of Ghazni’s raids then represented only plunder and not conquest. Simply put, Mahmud himself was overstretched and was not even in a position to achieve a permanent conquest across the Indus. With Ghazna as his capital ruling from the erstwhile palace of the Zabulshahis, the Shahi capital of Hund or Udabhandapura represented his furthest conquest, though Nandana was briefly held under tenuous control.

When Anandapala died in 1013, Trilochanapala his son and successor anticipated another raid on the Shahi territories for plunder under the pretext of vassalage. To get additional troops, he left to Kashmir. Kashmir is closely allied with the Shahis – after all, Didda, the legendary Kashmiri Queen was the granddaughter of Bhimadeva Shahi and Trilochanapala’s daughter is married to the son of Tunga, the Prime Minister of Kashmir. Tunga marched to Nandana, the Shahi capital but on hearing the news that the passes are blocked and Mahmud can’t cross the Khyber Pass, he returned back. Eventually, Mahmud came. 

Trilochanapala sent his son to hold Mahmud as long as he can and went to Kashmir to get an army. Trilochanapala’s son Bhimapala, immortalized in history as Nidar Bhim took his stand in Margalla Hills blocking Mahmud’s way. A spirited defence it was, Mahmud was stuck there for more than a month. One of the two wings of his army was mauled and he had to send his personal guard to salvage the situation. Finally, Bhimapala understood he can’t hold Mahmud anymore and launched a vicious attack on Mahmud’s lines to buy time for his army to retreat. A strong force was sent to hold Nandana and Bhimapala went towards his father. Mahmud’s ground intelligence was zero. He marched to the next logical destination – the Shahi capital city of Nandana. Another long siege and Nandana fell amidst much plunder. Once Nandana is finished, Mahmud decided to raid Kashmir as Bhimapala went off in that direction.

But, it’s turn to be surprised this time. Mahmud was blundering towards main force of Shahis and a powerful force from Kashmir under the overall command of Tunga. Trilochanapala asked Tunga to avoid a war and wear off Mahmud but he was a proud man. He refused caution and strategy to a bull-headed fight and lost. And that loss broke his power and costed him his head after his return to Kashmir. Trilochanapala understood where the fight was going and arranged an orderly retreat of the troops he was able to gather. He lost everything – except his army and his treasure chest. He is suddenly now a king without a kingdom.

He marched off in the direction of Siwaliks and carved a kingdom there, with Hastinapur as his capital city. He had trouble with the Raja of Sharwa, Chand Rai and rather than fighting him, sent Bhimapala to him as an emissary for marriage of Bhimapala with the daughter of Chand Rai. Chand Rai was already angry against the Shahis for carving a kingdom out of his kingdom and arrested Bhimapala. Trilochanapala didn’t retaliate. Slowly, Chand Rai understood the rationale and married his daughter to Bhimapala.

Now, with his domains extending till Jhelum, Mahmud erupted on mainland India. Chand Rai decided to take a stand but Bhimapala asked him to flee. Mahmud landed up on an empty fort and angry, he doubled up his pace to catch Chand Rai. After that, he raided Kannauj where the Pratihara king fled on his approach and declared submission. Mathura and other places were plundered before he returned back.  

Historians tell that, when Mahmud left, Chandela Vidyadhara attacked Pratihara Rajyapala and killed him for fleeing in the face of a battle. An angry Mahmud decided to punish Vidyadhara for insulting him. But, what happened is completely different. Mahmud received intelligence of a counter invasion towards Indus from Ganga plains and decided to act before the invasion took shape. But, he didn’t know who was leading it and why. It was Trilochanapala, his old nemesis who approached Vidyadhara for help to invade Mahmud’s territories. Sharwa and Kashmir will anyways join. It’s just a matter of conjecture what would have happened had the invasion took place.

Mahmud advanced towards Ganga, but had to face severe resistance near Jhelum by a governor of Trilochanapala. He still didn’t know whom he is fighting. When he reached Ganga area, he got information of an army going off in towards South. But, surprise awaited him – it was Trilochanapala, the Shahi who fought him for more than a decade and whom he probably believed was long dead!!

But, Trilochanapala was not ready to give him a war. He was just marching away – in other words, fleeing Mahmud with Mahmud chasing him. Suddenly, Trilochanapala stopped and offered battle. In the battle, he was severely injured and died. His family was captured. Muslim writers mention he died in a riot in the camp after the defeat but it’s more probable that he died of his battle wounds and in the desperate attempt to save their king, the soldiers didn’t pay sufficient attention to the royal family. They were honourably returned later. 

But, looking closely and the events which happened subsequently, one would notice that the Shahi wasn’t fleeing. He was drawing Mahmud towards Vidyadhara’s main force and understood that he can’t retreat any further and had to take a stand. Muslim chroniclers write that Vidyadhara was waiting with more than a lakh troops and 640 elephants. Trilochanapala died but he almost achieved his aim. Mahmud is clueless where he is, his supply lines are severely extended and he is facing an enemy who can crush him in a way that not even rumours of his death will reach his home!! Quickly, he concluded peace with Vidyadhara and fled home.

Trilochanapala died but he achieved something which no one ever achieved in Indian history either before him or after – a confederacy for a cause. It was the same confederacy which made Mahmud flee back home through the desert after pillaging Somnath. And it was the same confederacy which crushed his nephew Salar Masud and pushed back the Muslims across Indus again for the next 150 years. The Shahi resistance and Trilochanapala’s foresight are the only things which ensured that India is still a Hindu majority. And on a sad note, his name is not even known anywhere in India.

Kalhana Pandita in Rajatarangini sums it nicely.

How rapidly the very names of the glorious Sahis has faded from memory has been narrated here merely as an episode and not in detail. What is impossible to conceive even in a dream, where fancy is frustrated, is easily done by Providence for which nothing impossible exists. That Empire of the Shahis, with those ministers, the sovereign, and his entourage-whether it ever had an existence or not is what the people now wonder.

Not much is known about Bhimapala. It is known that he was operating in Nandana area during Mahmud’s Somnath raid – while Paramara Bhoja and others blocked Mahmud’s exit back through North Indian plains, Bhimapala attacked him in the desert to divest him of his spoils. It was not some desert tribe which Mahmud marched against in the next year but the Shahi himself who was investing Nandana. Bhimapala is said to have died in the siege of Nandana. After him, the Shahis slowly disappeared into Kashmiri nobility.

DISCLAIMER: The author is solely responsible for the views expressed in this article. The author carries the responsibility for citing and/or licensing of images utilized within the text.