In 818, he was ordained as a Buddhist priest by receiving the commandments of Buddhism at Todaiji Temple, and in 828, he studied Shingon Mikkyo, a form of Esoteric Buddhism, from Kukai at Jingoji Temple (or Toji Temple) and underwent the ritual of consecration.
818年（弘仁9年）東大寺で受戒した後、828年（天長5年）神護寺（あるいは東寺）で空海に真言密教を学び灌頂を受けた。