Ninna-ji is a Shingon sect Buddhist temple that was founded in 888 by the retired Emperor Uda. It is considered one of the "Historic Monuments of Ancient Kyoto", and was named a UNESCO World Heritage Site in 1994.
The temple served as a quasi imperial palace and was actually referred to as the Omura imperial palace because there was a tradition of having the son of an emperor serve as the temple’s chief abbot. This practice started with the founding of the temple and continued until 1869.
Many of the temple’s buildings were destroyed by fire in 1467 during the Ōnin War. Funds donated by the third Tokugawa Shogun, Iemitsu, were used to rebuild many of the structures in the 1620s.