 However, another history, Teio-Hennnenki, writes that Ujikimi Tachibana (橘氏公) and Shunjo Mihara (三原春上) established the temple at the command of Empress Masako, the first queen of Emperor Junna in 827.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.