白村江の戦い
The shrine was said to have been founded by Emperor Tenji when he built a castle surrounded by water and moved the authority in Dazaifu to the present-day Tofurō Ruins for defensive purposes in 664, due to his defeat in the Battle of Baekgang in August of the previous year. He dedicated the shrine to thousands of gods at Mount Hōman, which faces an unlucky direction.