In 940, Yuki Myojin (a gracious deity) or Yuki-jinja Shrine, which had been worshiped at the Imperial palace in Heiankyo (the former capital of Japan)s a guardian deity of the northern capital was transferred to Kurama by the Emperor Suzaku in order to appease the social unease caused by big earthquakes and conflicts that took place one after another in those days.
940年（天慶3年）、平安京の内裏に祀られている由岐明神（由岐神社）を都の北方の守護として、また当時頻発した大地震や争いなど相次ぐ世情不安を沈めるために、朱雀天皇の案により鞍馬に遷された。