Hakozaki Shrine was founded in , with the transfer of the spirit of the
kami Hachiman from Daibu Hachiman Shrine in what is Honami
Commandry,
Chikuzen Province in
Kyūshū. '', which was painted between 1275 and 1293 During the first
Mongol invasion on November 19, 1274 (''Bun'ei 11, 20th day of the 10th month
), the Japanese defenders were pushed back from the several landing sites. In the ensuing skirmishes, the shrine was burned to the ground. When the shrine was reconstructed, a calligraphy Tekikoku kōfuku'' (敵国降伏; surrender of the enemy nation) was put on the tower gate. The calligraphy was written by
Emperor Daigo, dedicated by
Emperor Daijo Kameyama as a supplication to Hachiman to defeat invaders. The shrine is highly ranked among the many shrines in Japan. It was listed in
Engishiki-jinmyōchō (延喜式神名帳) edited in 927. In 11th or 12th century, the shrine was ranked as
Ichinomiya (一宮; first shrine) of
Chikuzen Province. From 1871 to 1946, Hakozaki was officially designated a
Kanpei-taisha (官幣大社), in the first rank of
government supported shrines. Other similar
Hachiman shrines were
Iwashimizu Hachimangū of
Yawata in
Kyoto Prefecture and
Usa Shrine of
Usa in
Ōita Prefecture. ==Shinto belief==