It was in the summer of 859, one year after Emperor Seiwa came to power, when a monk named Gyokyo from Nanto Daianji Temple, a disciple of Kobo-Daishi Kukai visited Usa Jungu Shrine and received a message from God informing him to move the God to near Kyoto City, on the top of Mt. Otokoyama, to guard the nation.
清和天皇が即位した翌年の貞観(日本)元年（859年）の夏、弘法大師空海の弟子であった南都大安寺の僧行教が宇佐神宮に参詣した折に「われ都近く男山の峰に移座し国家を鎮護せん」との神託を受けた。