The origin of Nakayama-dera is uncertain. According to temple legend,
Emperor Ōjin established a place of worship on this site to enshrine the spirits of Prince Kagosaka and Prince Oshikuma, the sons of
Emperor Chūai.
Prince Shōtoku later founded the temple to appease the spirits of
Mononobe no Moriya, who was defeated by
Soga no Umako and Prince Shōtoku, as well as the spirits of Prince Kagosaka and Prince Oshikuma. The original site is where the temple's Oku-no-in sanctuary is currently located, in the mountain behind the current temple complex. The worship hall was built to encompass a cave in the large rock where Prince Kagosaka's spirit is enshrined. In 718, the priest Tokudo of
Hase-dera in
Yamato Province received a sacred seal from
Emma, king of the underworld, who instructed him to "spread the faith in Kannon." Tokudo is said to have placed the sacred seal in a stone chest in a
sarcophagus within the
Shiratorizuka Kofun in
Harima Province. Tokudo tried to popularize Kannon pilgrimages but was unsuccessful. Approximately 270 years later, during the
Heian period, cloistered
Emperor Kazan discovered the seal in the stone chest and revived the Saigoku Thirty-three Kannon Pilgrimage, with this temple designated as the 24th temple in the circuit. At the end of the Heian period, Tada Yukitsuna was troubled by his wife's unbelief. The Kannon at this temple converted her with the "bell rope" (the rope used to ring a bell), and the couple became happy again. From then on, pilgrimages to this temple for fertility and safe childbirth gained popularity, and the temple has attracted devotion from the
imperial family,
aristocrats,
samurai such as
Minamoto no Yoritomo, and commoners as a sacred place for prayers for safe childbirth. However, the entire temple complex was burned down in the
Battle of Arioka Castle between
Araki Murashige and
Oda Nobunaga, in 1578. The childless
Toyotomi Hideyoshi prayed fervently at the temple during the
Azuchi-Momoyama period, and credited it with the birth of his heir
Toyotomi Hideyori. The temple was relocated to its current location during the
Keichō era (1596-1615), and in 1603, Toyotomi Hideyori, with
Katagiri Katsumoto as construction commissioner, rebuilt the
main hall, Goma-dō, Amida-dō, and other buildings. At the end of the
Bakumatsu period,
Nakayama Yoshiko prayed for safe childbirth at the temple, resulting in a safe birth of
Emperor Meiji. The
Great Hanshin earthquake of 1995, damaged many of the temple's buildings and the
Tahōtō pagoda "Daigan-tō," was rebuilt in 2007, and the five-story pagoda, "Seiryu-tō," was rebuilt in 2017. Nakayamadera daimon02s2048.jpg|Sanmon Nakayamadera hondo2040.jpg|Hondō Nakayamadera amidado1920.jpg|Amida-dō Nakayamadera Pagoda.JPG|Tahōtō Pagoda Nakayama-dera Five-storied Pagoda 201708.jpg|Five-story Pagoda Nakayama-dera Daishi-do 201708.jpg|Daishi-dō Nakayama-dera Goma-do 201708.jpg|Goma-dō Nakayamadera shorodo1920.jpg|Shōrō Nakayama Temple Okunoin.jpg|Oku-no-In The temple is approximately a two-minute walk from
Nakayama-kannon Station on the
JR West Hankyu Railway Takarazuka Line or an 18-minute walk from
Nakayamadera Station on the
JR West Fukuchiyama Line. ==Cultural Properties==