Chinjugami

Chinjugami is a god enshrined to protect a specific building or a certain area of land. Nowadays, it is often equated with Ujigami and Ubusunagami. A shrine that enshrines a guardian deity is called a Chinjusha.

They contrast with Ujigami by having ties to land and buildings rather than bloodlines. Anyone living on the land worships them regardless of blood ties.

Overview
It is said to have originated in the Garanshin (garanjin (伽藍神)) of China. In the Buddhist temples of Japan, as Buddhism was introduced and Shinbutsu-shūgō progressed, Shinto deities were enshrined to protect temples, and later Shinto deities were also enshrined in buildings other than temples and in certain areas of land.

Nowadays, it is often thought that the jinchujin is the deity that lives in the land (Jinushigami), but if we trace back to the beginning, the jinchujin was a newly enshrined deity to suppress and subjugate the jishu kami. In other words, when people built artifacts on a certain land, they would enshrine a new deity with stronger spiritual power than the landowner deity in order to prevent the spirit of the deity dwelling in the land from causing hauntings that would harm people and artifacts. The landowner deity was expected to obediently submit to the guardian deity and to protect and assist the guardian deity in its activities (sometimes the landowner deity would resist and cause a haunting).

However, with time, the original meaning of the Shinto gods was forgotten, and the Shinto gods were confused with the landowner gods, which resulted in a conflation of the two. These guardian deities were worshipped in Buddhist temples, Mansions, Shōens, and Castles, and also in Villages.

As for the fact that gods came to be enshrined as guardian deities in villages, it is thought that one of the reasons for this was that in the conflict between a certain village and the Gōzoku that ruled the surrounding area, shrines came to be enshrined as guardians in villages as a form of opposition to the spiritual authority of the Ujigami, the clan gods enshrined by the Gōzoku.

Shinto shrines
Shrines erected as adjuncts to Buddhist temples were called jinjū-sha. The synonym (which is mainly a shrine) is called Jinguji. In addition, when the guardian of an institution is a Buddhist temple, it is sometimes referred to as Jinjū-ji, Jinjūdō, or Jinjū-den.