Sagami-ji

Sagami-ji (酒見寺), is a Shingon Buddhist temple in Kasai, Hyōgo Prefecture, Japan. Its mountain name (sangō) is Senjōsan (泉生山). Emperor Shōmu ordered its construction in 745 (the 17th year of the Tenpyō era) at the request of Gyōki, a Buddhist priest.

History
According to the temple records, the priest Gyōki received an oracle from a shrine, Sagami Myōjin (酒見明神), instructing a temple to be built on these grounds. Gyōki took the request to Emperor Shōmu, who then ordered the construction of Sagami-ji. When finished in 745, it was named Sagami after the oracle's origins.

Inscriptions on temple plaques record later visits from various emperors and shōguns, including shōgun Tokugawa Ieyasu.

The building was badly damaged in the Heiji Rebellion of 1159, and later rebuilt. The main temple was burnt down in conflicts during 1578, and was not rebuilt until the daimyō of Himeji, Honda Tadamasa, agreed to aid the Ikeda clan in its reconstruction.