In one theory, the upper shrine, or
Oku-sha, is said to have been first constructed in the 5th year of the Emperor Kogen (210 BC) while Buddhist tradition holds that a monk named Gakumon discovered the Oku-sha area and began the practice of
Shugendo there in the 2nd year of the Kasha era (849 AD). According to the
Nihon-Shoki, the
Emperor Tenmu had a map of the area made in 684 AD and a temporary building built the following year. Togakushi shrine was a pilgrimage site during the following eight centuries. Its name was ranked with the
Ise-jingu Shrine,
Koya-san Temple and
Enryaku-ji temples. Togakushisan Kansyuin Kenkou-ji was the formal name of the Togakushi Temple. Two major esoteric Buddhist sects,
Shingon and
Tendai fought for the hegemony of Togakushi Temple. Eventually the Shingon sect lost the battle. Togakushi Temple was changed to a shrine by the Meiji government's Buddhism/Shinto separation initiatives "
Shinbutsu bunri", "
Haibutsu kishaku", and the 1868 Temple Ordinance. Until that time, it was common in Japan for the same buildings to be used as both temples (Buddhist) and shrines (Shinto). Until the 19th century, Buddhist activities at the Togakushi Temple were dedicated to "
Avalokiteśvara". == Site ==