Enryaku-ji is a Tendai monastery located on Mount Hiei in Ōtsu, overlooking Kyoto. It was first founded in 788 during the early Heian period (794–1185) by Saichō (767–822), also known as Dengyō Daishi, who introduced the Tendai sect of Mahayana Buddhism to Japan from China. The temple complex has undergone several reconstruction efforts since then, with the most significant (that of the main hall) taking place in 1642 under Tokugawa Iemitsu. Enryaku-ji is the headquarters of the Tendai sect and one of the most significant monasteries in Japanese history. As such, it is part of the UNESCO World Heritage Site "Historic Monuments of Ancient Kyoto (Kyoto, Uji and Otsu Cities)". The founders of Jōdo-shū, Jōdo Shinshū, Sōtō Zen, and Nichiren Buddhism all spent time at the monastery. Enryaku-ji is also the center for the practice of kaihōgyō (aka the "marathon monks").
With the support of Emperor Kanmu, the Buddhist monk Saichō ordained a hundred disciples in 807. Maintaining a strict discipline on Mt. Hiei, his monks lived in seclusion for twelve years of study and meditation. After this period, the best students were retained in positions in the monastery and others graduated into positions in the government. At the peak of its power, Enryaku-ji was a huge complex of as many as 3,000 sub-temples and a powerful army of warrior monks. In the tenth century, succession disputes broke out between Tendai monks of the line of Ennin and Enchin. These disputes resulted in opposing Tendai centers at Enryaku-ji and at Mii-dera, known respectively as the Mountain Order and the Temple Order. Warrior monks were used to settle the disputes, and Tendai leaders began to hire mercenary armies who threatened rivals and even marched on the capital to enforce monastic demands.
As part of a program to remove all potential rivals and unite the country, warlord Oda Nobunaga ended this Buddhist militancy in 1571 by attacking Enryaku-ji, leveling the buildings and slaughtering monks.