The history of Assam goes back several thousand years; initially referred to as Pragjyotishpur in the two epics, Ramayana and Mahabharat, it later came to be known as Kamrupa. In fact, Kamrupa was first found mentioned as a frontier territory in the Allahabad Pillar inscription of Samudragupta (4th century BCE). Today, this ancient city is a district in Assam.
In the early 13th century Kamrupa was ruled by Raja Prithu Rae of the Khen Dynasty. They drew their lineage from Narakasura. They worshipped Kamteswari, an incarnation of Goddess Durga. It is said that the Khen rulers had very humble origins. They were probably local chieftains who rose to power after the fall of the Pala Dynasty. The ascension of the Khen rulers was the beginning of the Kamata Kingdom. There are numerous references to this place. In some chronicles it is known as Kamru or Kamrud, others call it Kamrupa or Kamata, while still others refer to this kingdom as Koch or Koch Hajo. Numerous attempts were made by invaders to attack Kamrupa. Amongst them was Bakhtiyar Khilji, the barbaric fanatic who ravaged major parts of India and caused irreparable destruction to the Indian civilization by looting, pillaging, and destroying temples and other structures. Khilji is said to be the man responsible for the destruction of Nalanda – the ancient Indian university.
Khilji continued ravaging more kingdoms, and towards the end of 1205 CE, he set out on an expedition to Kamrupa with an army of 12,000 horsemen. Kamrupa was at that time ruled by King Prithu Rae. The shrewd Khilji was a few miles away from Kamrupa when he befriended a local chieftain, converted him to Islam and gave him the name Ali. From then on, it was Ali who guided Khilji’s army. Meanwhile, knowing the gravity of the situation, the local tribes that were dwelling in and around the surrounding areas extended their support to King Prithu. Khilji and his army had to cross hilly terrains and deep jungles to reach the kingdom of Kamrupa. The villages were densely populated, and there was a strong fort in the middle of each village. Khilji’s army began to loot and plunder the villages indiscriminately. In retaliation, the combined Kamrup forces attacked Khilji’s army. Such was the valour of the tribal army that many Turkish soldiers were killed, and many were taken prisoner. Khilji’s army could not advance further. With the battle going in favour of Raja Prithu Rae, Khilji began to retrace his steps. He could foresee defeat. However, Raja Prithu persisted. He took the battle to the road, and in the fierce fight that followed, Khilji lost more of his army. Ali deserted Khilji, who somehow managed to escape with a few hundred soldiers. With great difficulty, the defeated Bakhtiyar Khilji reached Bengal. The Kanai Varasi rock inscription is proof of the destruction of the Turks who invaded Kamrupa in 1206 CE.
As for the captured soldiers, it is said that the kind king Prithu pardoned them, set them free, and made arrangements for their settlement. This was part of the Dharma-yuddha that Hindu kings followed in warfare and while dealing with prisoners of war. The prisoners were given all the essentials needed for a living. The Raja christened them as Gaudia, as they had entered from Gauda (Bengal). This significant development heralded the beginning of Islamic settlements in Assam. Raja Prithu Rae defeated Bakhtiyar Khilji in such a devastating manner, that the Turk never fought another battle, and years later he died of shame at the humiliation he received from the great King. Raja Prithu Rae had effectively slain Bakhtiyar Khilji forever.