The Rinzai school (, ) is one of three sects of Zen in Japanese Buddhism (along with Sōtō and Ōbaku). The Chinese Linji school of Chan was first transmitted to Japan by Myōan Eisai (1141 –1215). Contemporary Japanese Rinzai is derived entirely from the Ōtōkan lineage transmitted through Hakuin Ekaku (1686–1769), who is a major figure in the revival of the Rinzai tradition. History Rinzai is the Japanese line of the Chinese Linji school, which was founded during the Tang dynasty by Linji Yixuan (Japanese: Rinzai Gigen). Kamakura period (1185–1333) Though there were several attempts to establish Rinzai lines in Japan, it first took root in a lasting way through the efforts of the monk Myōan Eisai. In 1168, Myōan Eisai traveled to China, whereafter he studied Tendai for twenty years. In 1187, he went to China again, and returned to establish a Linji lineage, which is known in Japan as Rinzai. Decades later, (1235–1308) also studied Linji teachings in China before founding the Japanese Ōtōkan lineage, the most influential and only surviving branch of Rinzai. The time during which Rinzai Zen was established in Japan also saw the rise of the samurai to power. Along with early imperial support, Rinzai came to enjoy the patronage of this newly ascendant warrior class. Muromachi (or Ashikaga) period (1336–1573) During the Muromachi period, the Rinzai school was the most successful of the schools because it was favoured by the shōgun. The school may be said to have truly flowered and achieved a distinctly Japanese identity with Shūhō Myōchō (aka Daitō Kokushi 1283–1337) and Musō Soseki (1275–1351), two influential Japanese Zen masters who did not travel to China to study. Five Mountain System In the beginning of the Muromachi period, the system was fully worked out. The final version contained five temples of both Kyoto and Kamakura, presided over by Nanzen-ji. A second tier of the system consisted of Ten Temples. This system was extended throughout Japan, effectively giving control to the central government, which administered this system. The monks, often well educated and skilled, were employed by the shōgun for the governing of state affairs. Rinzai-monasteries Not all Rinzai Zen organisations were under such strict state control. The Rinka monasteries, which were primarily located in rural areas rather than cities, had a greater degree of independence. The Ōtōkan lineage, which centered on Daitoku-ji, also had a greater degree of freedom. It was