[2] A Tendai sect Buddhist temple, Heisen-ji, was founded in 717 AD by the Japanese Shugendō monk Taichō, who is said to have been the first person to ascend the sacred mountain Hakusan (2,702m)[3] It became a centre for mountain worship involving amalgamation of beliefs, philosophies, doctrines and ritual systems drawn from local folk-religious practices, pre-Buddhist mountain worship, Shinto, Taoism and Vajrayana[4] and ascetic practices involving climbing the mountain by various routes.
The temple was mentioned in the Heike Monogatari, and was the site of the 1183 Battle of Kurikara during the Genpei War between Kiso Yoshinaka and the Taira clan.
The temple was destroyed in 1338 by the forces of Shiba Takatsune for its support of the Southern Court of Emperor Go-Daigo during the Nanboku-chō period and again in 1440.
It was rebuilt with the support of the Muromachi shogunate, which levied a special tax on the seven provinces of the Hokuriku region for its reconstruction.
The temple precincts governed a domain yielding revenues of 90,000 koku, giving it a kokudaka which rivalled that of a daimyō, and it could field an army of 8000 sōhei warrior-monks.