During 8th to 16th century Rajput migrants founded many states in Himachal Pradesh. Central authority came into contact with these principalities from 11th century to British empire in India.
About A.D. 980, Kabul was captured by Turkish and last hurdle against Mohammedans (Turks) was broken down. Mahmud Ghzanavi succeeded his father in 997 AD. In 1001 AD he invaded India, and in 1008-09 in his fourth expedition he advanced into the Punjab and reach near the foot of hills. He made a raid on Nagarkot (Kangra) in A.D. 1008-09.
Although Anand Pal Shahi king of trans Himalaya was able to form a confederation of Himalayan rulers to fight against the Turk invaders and to save his trans-Indus dominions and Peshawar. Katoch ruler Jagdish Chandra also have gone to fight along with confederation. The confederate army fought the invaders bravely, unfortunately, when Mahmud was thinking of withdrawing Anand pal’s elephant ran away from battle field which cause chaos in Anand pal army and pave the way for the victory of Mahmud.
The Nagarkot remained under the possession of Mahmud’s governer till A.D. 1043. Katoch (Kangra) rulers helped by Tomar chief of Delhi against Madud. They succeeded to get fort back from grandson of Mahmud Ghzanavi with the help of Tomar chief of Delhi. In 1051-52 A.D. Abdul Rashid a son of Mahmud had captured the fort of Kangra but it was soon recovered by the Katoch rulers around 1060 A.D.
The Hindu Shahi rulers then continued to have warfare against Ghzanavi. Trilokpal and his son Bhim pal were both killed in battle, fighting against Mahmud Ghazni, which ended the Hindu Shahi rule in AD 1026.
The first two royal houses of Delhi sultanate viz. Slaves (1206-1290) and Khilji (12901320) did not pay any serious attention toward the Punjab hills. This time many Rajputs migrate to Himachal Pradesh and formed many Rajput states.
The Sultanate Period—
Tughlaq dynasty and Kangra—
Tughlaq dynasty was started in 1320 in Delhi when Ghiyasuddin Tughlaq (Ghazi Malik) assumed the throne.
Next ruler of Tughlaq dynasty was Muhammad Bin Tughlaq. He made an expedition against Kangra fort in 1337 during Prithvi Chandra reign which was failed. But no historians has made any reference to this attack.
After Muhammad Bin Tughlaq his nephew Firoz shah Tughlaq assumed the throne. During the reign of Kangra ruler Rup chand, Firoz shah Tughlaq besieged the fort of Kangra in A.D. 1365. He attacked Nagarkot because Rup chand had a plundering raid on the plain; which was not acceptable to Firoz shah Tughlaq. According to Farishta the name of Nagarkot was on this occasion changed to that of “Mohammedabad” in honor of the king.
People use to worship the image of Nowshaba (wife of Alexander) in Jawalamukhi temple which was left by the Alexander the great . In the temple there was a library of Hindu books, consisting of 1300 volumes. The Sultan took possession of few and ordered one of these books to be translated into Persian, which deal with philosophy, astrology and divination and it was titled “Dalayil-i-FirozShahi”. This translation was done by Izzudin Khalid Khani. Raja Rup chand died in AD 1375 and was succeeded by his son Sangara chand. During his period Firoz shah eldest son Nassir-ud-din was driven away from Delhi by his two cousin and took shelter at Nagarkot till the end of AD 1389 and in 1390 he assumed the throne under the name of Mohammed Shah.
Taimur Invasion of Kangra—
He was a Turk-Mongol conqueror who founded the Timurid dynasty in central Asia. Taimur attacked India in 1398 AD during the reign of last Tughlaq ruler Nassir-ud-din Mahmud shah Tughlaq.
During this time Kangra ruler was Raja Megh Chand. A reference to Nagarkot occurs in Taimur’s memoirs Malfuzat-i-Taimuri. He attacked Shivalik states on his return journey in 1399 AD and passed near Nagarkot, Nurpur to Jammu. He invaded Kiarda-dun valley of Sirmaur and Hindur (Nalagarh). That time Alam chand was the raja of Hindur who helped Taimur in his invasion.
Sikandar Lodi took expedition to Nagarkot but was not able to capture the fort. Sikandar Lodhi also broke the sacred images of the Jawalamukhi temple at Nagarkot.