Tenryū-ji (天龍寺), formally known as Tenryū Shiseizen-ji (天龍資聖禅寺), is the head temple of the Tenryū-ji branch of the Rinzai sect of Zen Buddhism, located in Susukinobaba-chō, Ukyō Ward, Kyoto, Japan. The temple was founded by Ashikaga Takaujiin 1339, primarily to venerate Gautama Buddha, and its first chief priest was Musō Soseki. Construction was completed in 1345. As a temple related to both the Ashikaga family and Emperor Go-Daigo, the temple is held in high esteem, and is ranked number one among Kyoto’s so-called Five Mountains. In 1994, it was registered as a UNESCO World Heritage Site, as part of the “Historic Monuments of Ancient Kyoto“.

( Ref: https://en.m.wikipedia.org/wiki/Tenry%C5%AB-ji)

In the early Heian period, Empress Tachibana no Kachiko, wife of Emperor Saga, founded a temple called Danrin-ji on the site of present-day Tenryū-ji. The temple fell into disrepair over the next four hundred years.

In the mid-thirteenth century, Emperor Go-Saga and his son Emperor Kameyama turned the area into an imperial villa which they called “Kameyama Detached Palace” (亀山殿 Kameyama-dono). The name “Kameyama”, which literally means “turtle mountain”, was selected due to the shape of Mt. Ogura, which lies to the west of Tenryū-ji—it is said to be similar to the shape of a turtle’s shell. All Japanese temples constructed after the Nara period have a sangō, a mountain name used as an honorary prefix. Tenryū-ji’s sangō, Reigizan (霊亀山, “mountain of the spirit turtle”), was also selected due to the shape of Mt. Ogura.

(Ref: https://en.m.wikipedia.org/wiki/Tenry%C5%AB-ji

The palace was converted into a temple in the middle of the Muromachi period[1] at the behest of Ashikaga Takauji, who wished to use the temple to hold a memorial service for Emperor Go-Daigo. Ashikaga became the shōgun in 1338, and Go-Daigo died in Yoshino the following year. Ashikaga opposed the failed Kenmu Restoration, which was started by Emperor Go-Daigo, and the emperor decreed that Ashikaga be hunted down and executed. When his former-friend-turned-enemy died, Ashikaga recommended that Zen monk Musō Soseki construct a temple for his memorial service. It is said that the temple was originally going to be named Ryakuō Shiseizen-ji (暦応資聖禅寺), Ryakuō being the name of the reign of the emperor of the northern court at that time. However, Ashikaga Takauji’s younger brother, Tadayoshi supposedly had a dream about a golden dragon flitting about the Ōi River (also known as the Hozu River), which lies south of the temple, and the temple was instead named Tenryū Shiseizen-ji—the term “Tenryū” literally means “dragon of the sky”. In order to raise the funds to build the temple, two trading vessels called Tenryūji-bune were launched in 1342. A ceremony was held on the seventh anniversary of Emperor Daigo II’s death in 1345, which functioned as both a celebration of the completion of the temple, and as Daigo’s memorial.

(Ref:

During the 1430s, the temple entered into a tributaryrelationship with the Imperial Court of Ming-dynastyChina. Chinese imperial policy at the time forbade formal trade outside of the Sinocentric world order, and both the Japanese imperial court and Ashikaga shogunate refused to submit to Chinese suzerainty. This arrangement with the Tenryū-ji allowed for formal trade to be undertaken between the two countries, in exchange for China’s control over the succession of chief abbot of the temple.[2] This arrangement gave the Zen sect, and Tenryū-ji more specifically, a near monopoly on Japan’s legitimate trade with China. In conjunction with the temple of the same name in Okinawa, as well as other Zen temples there, Tenryū-ji priests and monks played major roles in coordinating the China–Okinawa–Japan trade[3] through to the 19th century.

The temple prospered as the most important Rinzai temple in Kyoto, and the temple grounds grew to roughly 330,000 square meters (33 hectares; 82 acres) in size, extending all the way to present-day Katabira-no-Tsuji station on the Keifuku Railway. At one time, the massive grounds were said to contain some 150 sub-temples, however, the temple was plagued with numerous fires, and all of the original buildings have been destroyed. During the Middle Ages, the temple met with fire six times: in 1358, 1367, 1373, 1380, 1447 and 1467. The temple was destroyed again during the Ōnin War and subsequently rebuilt, but in 1815 it was lost to yet another fire. The temple was severely damaged during the Kinmon Incident of 1864, and most of the buildings as they stand today are reconstructions from the latter half of the Meiji period. The garden to the west of the abbey, created by Musō Soseki, shows only traces of its original design.

(Ref: https://en.m.wikipedia.org/wiki/Tenry%C5%AB-ji