There is debate about the origin of the kami with some saying they originated in
Matsunoo Sha and others saying they originated in
Hie Sha. In 668 AD,
Emperor Tenji decided to relocate the capital to
Ōmi Province and built the
Ōtsu Palace. At this time, the
kami of
Ōmiwa Shrine in
Yamato Province (who served as protector of the imperial dynasty) was relocated as well, and was installed in the Ōmiya (大宮, now Nishi Hongū), whereas the original sanctuary came to be called the Ninomiya (二宮, now Higashi Hongū). However, this is likely a story that was created in later times. In 788 AD,
Saichō erected the
Tendai Buddhist temple complex of
Enryaku-ji on Mount Hiei. After the transfer of the capital to
Heian-kyō, Enryaku-ji and by extension, Hie Sha came to be guardians of the spiritually vulnerable northeast quadrant from the capital. As Enryaku-ji became ever more powerful, and the Buddhist faith gradually amalgamated with Shinto under the
Shinbutsu-shūgō policy, Hie Sha was subsumed into Enryaku-ji. As missionaries from Enryaku-ji built Buddhist temples all across Japan, they also spread the faith in the "" and the Hie
kami. The shrine became the object of Imperial patronage during the early
Heian period. In 965,
Emperor Murakami ordered that Imperial messengers were sent to report important events to the guardian
kami of Japan, and Hie Sha was added to this listing by
Emperor Go-Suzaku in 1039. This unique number of Imperial-designated shrines has not been altered since that time. == Kamo Tamayorihime no Mikoto ==