Konjin (金神, "God of metals") is an itinerant Kami (a divine spirit) from Onmyōdō (a traditional Japanese cosmology and system of divination based on the Chinese philosophies of Wu Xing (Five Elements) and Yin and yang). Konjin is associated with compass directions, and said to change position with the year, lunar month, and season.
Konjin's momentary location in space at any given time is considered an unlucky direction, because this kami is stated to be particularly violent and said to punish through curses. Based on this, a calendar with astronomical and geomantic direction relations was created, which included interdictions (kataimi). A practice known as katatagae (changing directions) is used to avoid the worst directions on a given day, usually where Konjin, Ten'ichijin, and Taihakujin are currently located.
Katatagae was favored among Heian-period nobles and it became a part of their daily lives. The construction and renovation of houses, moving one's residence, public works construction, and traveling was strongly influenced by katatagae.
Konjin was said to be at tremendous power when residing as Kimon Konjin ("Konjin of the demon's gate") at either of the two demon's gates (the northeast "front" gate, called omote-kimon, and the southwest "back" gate, called ura kimon. These directions are called Ushitora and Hitsujisaru respectively. ). Kyoto was supposedly protected from any bad influences by placing Saichō's temple Enryakuji at Mount Hieizan, which is located to the northeast of Kyoto.
Late in the Edo Period, in the province of Bitchū (western Okayama Prefecture), Konkō Daijin (Akazawa Bunji) began to learn a spiritual way later called Konkōkyō which began in spiritual experiences with the deity Konjin. However, he stated that Konjin was not an evil kami but a deity who could bestow virtue. The Oomoto-kyo of Nao Deguchi was influenced by Konkōkyō to proclaim that "Ushitora no Konjin" was the kami who would restore the world.