The history of Hamirpur district is intimately associated with the Katoch dynasty which ruled the area between Ravi and Satluj in the olden days. In fact, the Hamirpur area formed a part of the old Jullundur-Trigarta empire whose mention dates back to the days of Mahabharata, Panini Ashtadhyai, and Puranas.
It is stated that Bhumi/Bhuma Chand, the founder of the Katoch dynasty, was the ruler of Trigarta at the time of Mahabharta war between Kauravas and Pandavas and he fought on the side of Kauravas.
Panini referred the people of this kingdom as great warriors and fighters, the tradition of those people seems to have continued till today where thousands of people are still in the Indian Army and who were predominant in the British Army too, and who have been serving the Armies with distinction. Although there has been not much of recorded history about the ancient empire, it is believed that in ancient days of the Mauryas and imperial Guptas, the area came under their sovereignty.
During the middle ages, it is believed that the area fell under the control of Mohammad Gaznavi, Temurlang and Mughal Nawab, and other Sultans. But with the passage of time, all the aforesaid rulers faded away and at the time of Hamir Chand, a Katoch ruler, the area was under the feudal hill chiefs commonly known as Ranas. Some of the prominent amongst them were Ranas of Mewa, Mehalta and Dhatwal. These feudal chiefs were in a quarrel among themselves and intermittent fights were the order of the day. It was only the Katoch dynasty that subjugated these petty chiefs and brought the entire area under their sway.
The Katoch Dynasty came to the limelight during the time of Hamir Chand who ruled from 1700 AD to 1740 AD about a period of 40 years over the then Kangra State. It was this ruler who built a fort at Hamirpur and the present Hamirpur derives its name from this ruler.
It was, indeed, during the period of Raja Sansar Chand II that the area of the present Hamirpur district came into prominence.
Raja Sansar Chand had made Tira Sujanpur his capital and constructed palaces and temples at this place.
Raja Sansar Chand ruled from 1775 AD to 1823 AD.
Sansar Chand took over the rein of his kingdom at a very young age and was restless to recapture the Kangra Fort of his dynasty which had been passed on the Mughals for about 160 years.
He dreamt of establishing the old empire of JullundurTrigarta which his ancestors held at one time and, perhaps, according to some of the historians, he attempted twice to conquer the plains, but, was frustrated in his attempt by the rise of Sikh Raja Ranjit Singh.
Therefore, he diverted his attention to conquer the other hill chiefs.
He attacked Mandi State and made Raja Ishwari Sen a prisoner for 12 years at Nadaun.
Then, he advanced to Suket which after conquering was given back on the promise to pay tribute.
Thereafter, he annexed parts of Bilaspur State on the right bank of river Satluj.
Alarmed by the aforesaid miraculous success, all the hill chiefs combined against Raja Sansar Chand and invited the Gorkhas to invade over the kingdom of Raja Sansar Chand.
The invitation well suited the designs of Gorkhas and the combined armies fought against the Sansar Chand army at Mahal Morian in Hamirpur.
The combined army was defeated by Raja Sansar Chand and was forced to retreat on the left bank of river Satluj.
They were looking forward to an opportunity to revenge the defeat.
As ill-luck would have it, Raja Sansar Chand on the advice of his General Gulam Mohammad tried to affect the economy in the army by replacing the existing ones with Rohillas.
This indeed was a great folly on his part and having heard the weaknesses of the newly formed army, the Gorkhas in combination with other hill chiefs again crossed over the Satluj river and fought a second battle at the same place at Mahal Morian in 1806, where the Katoch army was defeated and Raja Sansar Chand with his family took shelter in the Kangra fort.
Gorkhas not satisfied with victory chased the Kangra Raja and beseized Kangra fort.
Ruthless as they were, they looted the area in between the fort of Kangra and Mahal Morian and virtually desecrated the villages.
On their way, they freed Raja Ishwari Sen of Mandi who had been imprisoned at Nadaun by Raja Sansar Chand for 12 years.