Tenryuji (天龍寺, Tenryūji) is the most important temple in Kyoto's Arashiyama district. It was ranked first among the city's five great Zen temples, and is now registered as a world heritage site. Tenryuji is the head temple of its own school within the Rinzai Zen sect of Japanese Buddhism.
Tenryuji was built in 1339 by the ruling shogun Ashikaga Takauji. Takauji dedicated the temple to Emperor Go-Daigo, who had just passed away. The two important historical figures used to be allies until Takauji turned against the emperor in a struggle for supremacy over Japan. By building the temple, Takauji intended to appease the former emperor's spirits.
https://www.japan-guide.com/e/e3913.html