Until the Meiji period (1868-1912), the jing?-ji ( were places of worship composed of a shrine temple)Buddhist temple and of a shrine dedicated to a local kami. These complexes were born when a temple was erected next to a shrine to help its kami with its karmic problems. At the time, kami were thought to be also subjected to karma, and therefore in need of a salvation only Buddhism could provide. Having first appeared during the Nara period (710 - 794), jing?-ji remained common for over a millennium until, with few exceptions, they were destroyed in compliance with the Kami and Buddhas Separation Act of 1868. Seiganto-ji is a Tendai temple part of the Kumano Sanzan Shinto shrine complex, and as such can be considered one of the few shrine-temples still extant.
When Buddhism arrived in Japan, it encountered some resistance from pre-existing religious institutions and beliefs. One of the first efforts to reconcile pre-existing Japanese religion with Chinese Buddhism (in what would later be called shinbutsu sh?g?, or amalgamation of kami and buddhas) was made in the 8th century during the Nara period with the founding of so-called jung?ji or shrine-temples, religious complexes consisting of a shrine and a temple.[note 1]
The first shrine-temple ever was very probably Usa Hachiman-g?, where a temple called Miroku-ji was completed in 779, however the earliest clearly documented case is that of a man who in 749 in Kashima, Ibaraki prefecture built a temple next to a shrine. Behind the inclusion within a shrine of Buddhist religious objects was the idea that the kami were lost beings in need of liberation through the power of Buddhism.Kami were then thought to be subject to karma and reincarnation like human beings, and early Buddhist stories tell how that the task of helping suffering kami was assumed by wandering monks. During his wanderings, some local kami would appear in a dream to a monk, telling him about his problems. To improve the kami's karma through rites and the reading of s?tras, the monk would build a temple next to the kami's existing shrine. The building of temples at shrines produced shrine-temple complexes, which accelerated the process of amalgamation of the two religions. As a result of the creation of shrine-temples, many shrines that had until then been just an open-air site, in keeping with tradition, became Buddhist-style groupings of buildings. In this fashion, Buddhism took over many sites that had until then been dedicated to local kami beliefs.
K?kai himself left writings that make it clear he saw no problem in a mixed institution like the jing?-ji. There, Buddhist clergy would routinely recite s?tras on behalf of a kami, to guide him or her to satori. The institution had the government's approval and was meant on one side to be a tool to spread Buddhism to the provinces, on the other as a way to install religious representatives of the government there. During the Heian period a great number of temples were built next to shrines, but the term jing?-ji itself tended to disappear, suggesting that temples were taking over control of the shrines. How pervasive was Buddhism can be inferred from the fact that even Ise Shrine, a place considered even today the holiest of Shinto shrines, in 1868 included almost 300 Buddhist temples and practiced Buddhism. This in spite of strict rules which forbade Buddhism within the shrine itself.[note 2]
Because none of the very few extant jing?-ji is intact, their composition is known only through old drawings and paintings. We know that the temple part of the shrine-temple complex consisted of several buildings, among them a main hall (honji-d? ()),[note 3] a pagoda, a Buddhist gate (mon) and a betsu-in (, the monks' residence). The main priest was tellingly called shas? () or "shrine Buddhist monk", and was both a shrine priest and a Buddhist monk.
At the end of the 8th century, in what is considered the second stage of the amalgamation, the kami Hachiman was declared to be tutelary deity of the Dharma and a little bit later a bodhisattva. Shrines for him started to be built at temples (giving birth to the so-called temple-shrines), marking an important step ahead in the process of amalgamation of kami and Buddhism. When the great Buddha at T?dai-ji in Nara was built, within the temple grounds was also erected a shrine for Hachiman, according to the legend because of a wish expressed by the kami himself. Hachiman considered the shrine his due reward for having helped the temple find the gold and copper mines from which the metal for the great statue had come. After this, temples in the entire country adopted tutelary kami (chinju (/), enshrining them in specially built shrines called chinjusha (lit. "tutelary shrine").
A variant of the jing?-ji was the miyadera (, literally "shrine temple"). Miyadera were temples founded and staffed by Buddhist monks, which however had as their main object of worship (the honzon) a kami. Unlike a jing?-ji, a miyadera had no priestly clan performing kami rituals in a separate shrine. Also, unlike those of a jing?-ji, monks at a miyadera could marry and pass their position to their children. There were also Buddhist monks with a subordinate function who were denied the right to marry. A notable example of a miyadera was Iwashimizu Hachiman-g?-ji, now just a Shinto shrine. Its honzon was kami Hachiman, soul of Emperor ?jin.
The first miyadera was founded by a monk from Daian-ji called Gy?ky? who invited Hachiman from Usa to Iwashimizu Hachiman-g?. Other miyadera, such as Gionsha, Kankei-ji and Kitano Tenman-g?, were founded shortly afterwards. Miya-dera were particularly numerous among shrines dedicated to mountain religious sects like the Kumano Sanzan complex and the Hakusan Shrine network.
The improperly-named institution traditionally called "Twenty-two Shrine System" was in fact a network of shrine-temples under Buddhist control. Its jing?-ji were, besides religious institutions, vehicles of the power of houses like the Fujiwara, which wished to control religious matters; the Twenty-two Shrine System was meant to organize them and facilitate that control.
The two former components of the shrine temple are now separate institutions. The link to the former temple part follows that to the former shrine part.
In 1868, the government ordered the complete separation of Buddhism and Shinto. The measure had several goals, the main one being the weakening of Buddhism, which had collaborated with the Tokugawa shogunate. Although the government's Kami and Buddhas Separation Act didn't explicitly order the closing of temples, the destruction of Buddhist property and the defrocking of Buddhist priests and nuns, it was often interpreted as implying it. As a consequence, the haibutsu kishaku (literally, 'Away with Buddha, destroy Shakyamuni') movement, born spontaneously as a reaction against Buddhism's collaboration with the Tokugawa sh?guns, soon spread to the entire country with enormous consequences. An estimated 30,000 Buddhist structures were demolished between 1868 and 1874. A substantial part of the population that had felt financially exploited by the danka system (? danka seido) participated in the movement.
The shinbutsu bunri policy was also the direct cause of serious damage to important cultural properties. Because mixing the two religions was now forbidden, both shrines and temples of shrine-temple complexes had to give away the parts of their properties which were now illegal, thus damaging the integrity of their cultural heritage and decreasing their own historical and economic value.Shas? were forced to become laymen. For example, the shrine today called Tsurugaoka Hachiman-g? in Kamakura was until 1868 a jingu-ji called Tsurugaoka Hachimang?-ji. It was forced to demolish its entire Buddhist shichid? garan and sell it as wood. Its giant Ni?, the two wooden wardens usually found at the sides of a temple's entrance, being objects of Buddhist worship and therefore illegal where they were, were sold to Jufuku-ji, where they still are.