, or Zuiryusan Nanzen-ji, formerly Zenrin-ji, is a Zen Buddhist temple in Kyoto, Japan. Emperor Kameyama established it in 1291 on the site of his previous detached palace. It is also the headquarters of the Nanzen-ji branch of Rinzai Zen. The precincts of Nanzen-ji are a nationally designated Historic Site and the Hōjō gardens a Place of Scenic Beauty. The temple was destroyed in a fire in 1895 and rebuilt in 1909.
Nanzen-ji was founded in the middle Kamakura period (1291, or Shōō 4 in the Japanese era system). It was destroyed by fire in 1393, 1447, and 1467, rebuilt in 1597, and expanded in the Edo era. A large complex, it has varied over time between nine and twelve sub-temples.
Zenkei Shibayama, who provided a popular commentary on the Mumonkan, was an abbot of the monastery.
Nanzen-ji is not itself considered one of the "five great Zen temples of Kyoto"; however, it does play an important role in the "Five Mountain System" which was modified from Chinese roots. Tenryū-ji is considered to be one of the so-called Kyoto Gozan or "five great Zen temples of Kyoto", along with Shōkoku-ji, Kennin-ji, Tōfuku-ji, and Manju-ji. The head temple presiding over the Gozan in Kyoto is Nanzen-ji. After the completion of Shōkoku-ji by Ashikaga Yoshimitsu in 1386, a new ranking system was created with Nanzen-ji at the top and in a class of its own. Nanzen-ji had the title of "First Temple of The Land" and played a supervising role.
The temple's Sanmon gate was originally constructed in the 13th century, destroyed in 1369 at the order of the government, and reconstructed in 1628. The gate contains stairs to an elevated viewing area, which was the setting for a famous scene in the 1778 Kabuki play Sanmon Gosan no Kiri inspired by the story of the criminal Ishikawa Goemon who is said to have spoken of the beauty of the view (but who was executed prior to the construction of the current gate).
The hōjō (abbot's quarters) of Nanzen-ji is notable both for its gardens and its art.