The temple is originally in existence from the 10th century. The temple was originally believed to have been established by Adi Shankara during the 8th century, with later expansions by the Garhwal Kingdom. Garhwal (also the ruling dynasty), the region in Himalayas, where the temple is located, is referred with the name for the first time in a copper plate inscription in the temple from the period of Raja Man Shah during 1610. The temple received contributions from other rulers of the dynasty like Sahaj Pal, who donated a bell to the temple in 1551, as indicated by the inscriptions in the temple. Man Shah, the other ruler of the dynasty made contributions and is indicted in the inscriptions from 1610 CE. The region was ruled by Raja Prithvi Pat Shah as seen from the inscriptions in the door and doorways in the temple dated to 1664. King Jai Kirthi Shah who ruled the region during 1780, ended his life in the temple as he was betrayed by his courtsmen.