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) 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 an 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, who levied a special tax on the seven provinces of the Hokuriku region for its reconstruction. As a result, the temple expanded to a powerful religious city consisting of 48 shrines and 36 temples, along with an urban complex of over 6000 living quarters for priests or shrine personnel. The temple precincts governed a domain yielding revenues of 90,000 koku, giving it a kokudaka which rivalled that of a daimyō, an edit could field an army of 8000 sōhei warrior-monks.