The small hill kingdom enjoyed a large degree of independence till the eve of Muslim invasions in northern India. States of the foothills were devastated by Muslim invaders from time to time. Mahmud Ghaznavi conquered Kangra at the begining of the 10th centuary. Timur and Sikander Lodi also marched through the lower hills and captured several forts and fought many battles.
Later on as the Mughal dynasty began to break up; the rulers of the hill states took full advantage. The Katoch rulers of Kangra availed of this opportunity and Kangra regained independence status under Maharaja Sansar Chand who ruled for nearly half a centuary. He was one of the ablest administrators of the region. After he took formal possession of Kangra fort, Sansar Chand began to expand his territory. The states of Chamba, Suket, Mandi, Bilaspur, Guler, Jaswan, Siwan and Datarpur came under the direct or indirect control of Sansar Chand.