Tatari-gami (祟り神)

Tatari-gami are Shikon (four spirits) which are held in awe but avoided, and believed to become a powerful guardian god if treated cordially. It is also believed that whether to receive a benefit or misfortune depends on the depth of a person's faith. This is what Goryo-shinko (a folk religious belief of avenging spirits) is about. The faith, in general, tends to be practiced cordially and on a large scale because of the nature of the god. Many branch shrines have been established.

The purpose of Gion Festival, a long-lasting festival held in Heian-kyo, an ancient capital Kyoto, is to pacify and give repose to Tatari-gami. Its shusaijin (main enshrined deities) or Gion Shinko (Gion Faith) and Gozu Tenno (deity said to be the Indian god Gavagriva) is Susano (Deity in Japanese mythology), which is the typical example of Tatari-gami. Gozu-Tennosha Shrines were built across Japan, because Tatari-gami was believed to be an evil god bringing epidemic but at the same time come to work as the guardian god if cordially treated.

Nihonshoki (Chronicles of Japan) describes that conquered gods on the earth, particularly Yamata no Orochi (eight forked great serpent) exterminated by Susanoo are typical Tatari-gami. The sacred sword, Ama no Murakumo no Tsurugi Sword which came out of Yamata no Orochi has been enshrined as the Three Sacred Treasures of the Imperial Family. In the Izumo-taisha Shrine and Suwa-taisha Shrine, Kunitsukami (gods of the land) believed to have once lived there have been sealed and enshrined.
(The ranking of the shrines sacred to such gods is Taisha, whereas the ranking of the sacred to conqueror Tenjin (heavenly gods) is Jingu.)

However Nihonshoki has it that the Emperor Tenmu died from a curse of Ama no Murakumo no Tsurugi Sword, and Nihon Koki' (Later Chronicle of Japan) describes that the Emperor Kanmu died from a curse of Totsuka-no-tsurugi Sword (a sacred sword with which Yamata no Orochi was exterminated.)
The curses of the sacred sword appear to have been considered to be extremely powerful
In the former case, Nihonshoki has it that the curse was placed because the Ama no Murakumo no Tsurugi Sword stolen from Atsuta-jingu Shrine and lost was presented to the Imperial Court and stored there. In the latter case, the curse was placed because the sword was forced to move from Isonokami-jingu Shrine to Heian-Kyo. In the end, these sacred swords were held in reverence and returned to where they had been found.

Persons who were awed because of their unfortunate deaths, such as SUGAWARA no Michizane, the Emperor Sutoku, and TAIRA no Masakado have been enshrined as a god categorized into Tatari-gami. In particular, TAIRA no Masakado has been regarded as an Ubusunagami (guardian deity of one's birthplace) that protects Tokyo, but it is at the same time a typical Tatari-gami that places many curses, which is known as Tradition of head tumulus of TAIRA no Masakado.

Hassho goryo
The spirits of Imperial Prince Sawara, Imperial Prince Iyo, FUJIWARA no Yoshiko, TACHIBANA no Hayanari, FUNYA no Miyatamaro, SUGAWARA no Michizane, KIBI no Makibi, and Empress Inoe are collectively called Hassho goryo (the spirits of eight people who died unhappy deaths as a result of political conspiracies) and enshrined as Tatari-gami in many places in Japan.