Emperor Seiwa
The temple got its start when Kūkai's pupil, the monk Shinshō, aspired to found a temple for the worship of the "Gochi Nyorai", or Five Wisdom Buddhas. In 853, he purchased the mansion of Fujiwara no Sekio for this purpose. The construction of temples was forbidden in Kyoto at the time, however, and so it was not until ten years later, when formal Imperial approval was granted by Emperor Seiwa, that the Zenrin-ji was formally founded.