Among the two esoteric Buddhism that were mainstream in those days, the one adopting the teachings of the Tendai Sect was Sanno Shinto, and the one adopting the teachings of the Shingon Sect was Ryobu Shinto.
当時の仏教界の主流であった密教二宗のうち、天台宗の教えをとりいれたのが山王神道、真言宗の教えをとりいれたのが両部神道である。