The temple was founded in the 8th century AD. Its origins are historically unclear, but it is said that the Chinese monk Jianzhen initiated a disciple into the Buddhist path, who saw in a dream in 772 that Mount Kurama had a spiritual power and built an esoteric temple to concentrate and control this power. It was burned down many times throughout the medieval era but the Buddhist statues and treasures inside it were always rescued and are today National Treasures. It is still believed today that tengu and other mountain spirits live in this area.