 Genko-Shakusho wrote that the fourth queen of Emperor Junna secretly escaped from the Royal Palace in Kyoto and moved to Mount Kabutoyama in 828 with Kūkai's help.Kūkai made a statue of Nyoirin of woods in Mount Kabutoyama in 830, and built the main building of the temple next year.This temple has four national Important Cultural Properties selected by the Japanese government.