Lying between the Ganga and the Chenab rivers from the time of the Gurus to the reign of Maharaja Ranjit Singh fluctuated from guarded friendship to open hostility. Guru Nanak (1469-1539) and later his son, Baba Sri Chand, had preached the Sikh tenets in the hill tract east of the Punjab proper. Under the order of Guru Amar Das (1479-1574), his nephew, Savan Mall, had gone to Haripur (Guler) state, to preach as well as to send down the River Beas timber needed for the new habitation being raised at Goindval.
Guru Hargobind (1595-1644) came in contact with some of the chiefs of these Rajput states in the Gwalior Fort where he, along with them, was held captive under the orders of Emperor Jahangir. He also helped Dharam Chand, a prince of Handur (Nalagarh) to regain his throne after his release from Gwalior. He, through his son, Baba Gurditta (1613-38), founded the township of Kiratpur in Kahlur (Bilaspur) state to which place he himself repaired in 1635. Kiratpur remained the seat of the Gurus until Guru Tegh Bahadur founded, in 1655, Chakk Nanaki, later renamed Anandpur. The rulers of Kahlur treated the Gurus with reverence until Raja Bhim Chand, who ruled from 1665 to 1692, became jealous of Guru Gobind Singh`s royal style and growing repute. The Guru withdrew temporarily from Anandpur, and accepting, in 1685, the invitation of the friendly ruler of Sirmur, took up residence in his territory.