According to "Nijunisha honen", Kukai (a Japanese monk, scholar, poet, and artist, founder of the Shingon or "True Word" school of Buddhism) directly asked the god Inari to be his guardian deity.
『二十二社本縁』では空海が稲荷神と直接交渉して守護神になってもらったと書かれている。