Early in the Heian period, En no Ozunu (also called En no Gyoja) mastered Juho (magic) of Kujaku Myoo by practicing mountain worship and responded, with Mt. Katsuragi in Nara as his base, to the religious needs of people who were uneasy about the development of the Ritsuryo system (a system of centralized government based on the Ritsuryo code).
平安時代初期、役小角（えんのおづぬ、役行者ともいう）が、山岳信仰を行い孔雀明王の呪法を体得し、奈良県の葛城山を中心に当時の律令制の進展に不安だった民衆の宗教的な欲求に応えた。