The temple was built by the Sikh ruler of the Patiala State, Maharaja Bhupinder Singh, who financed the building of the temple in his capital and oversaw its installation in 1936. Legend has it that the Maharajah built the temple to protect the city from flooding and performed annual sacrifice at the temple.. Bhupinder Singh ruled the princely state of Patiala from 1900 to 1938.