Gurudwara Nanaksar, located favourably in the eastern part of a village called Hakimpur, was built by Maharaja Ranjit Singh to commemorate Guru Hari Rai Sahib Ji. It is believed that while moving towards Kiratpur Sahib, the guru took rest here for some days. As per legends, the guru was accompanied by an army of 2200 men when he came to this place. He tied his horses to Neem and Peepal trees, which still exist within the premises of this complex.
Gurudwara Nanaksar also served as the resting point of Guru Tegh Bahadur Sahib Ji, during his journey to Sri Anandpur Sahib. Besides, Nanaksar Gurudwara lies on Banga-Hakimpura-Phagwara Road and is around 5 km away from Bahiram Railway Station.