Eso hachimangi lie on the north bank of the Chikugo River, in the southern art of Asakura in Fukuoka. It is said Eso Hachimangu was founded in 661 around the time the "Empress Saimei" died near here at the Asakura temporary palace. It is claimed that the mound on the hill above was the temporary burial site of Saimei before her body was taken back to Yamato for burial, though evidence suggests that in reality it is a 5th century burial mound. "Empress" is in quotes because the title tenno, which is the current title translated as emperor did not become used until after the events of the the mid to late 7th century
As a Hachimangu, it enshrines Hachiman, now considered to be Ojin, god of war. At the time Hachiman was purely a local north Kyushu cult with no association with Ojin. However hachiman would have been familiar to most of the 40,000 strong army assembled here, as most were from Kyushu. later hachiman would spread to the capital area and later still, in the 9th century, become associated with Ojin. Also enshrined here are the "emperors" who succeeded Saimei, her sons Tenji and Tenmu
The empress and crown prince Tenji were here assembling an invasion force to attempt to reinstate the Paekche, one of the kingdoms of the Korean peninsula that had been defeated by another kingdom, Sila, with the help of Tang China. Exactly why this was so important to the Yamato is not explained, though the ruling Yamato clans had extensive ties with Paekche and most likely were related.
In the ensuing battle, Yamato was completely crushed by Sila and Tang who had an army one-quarter the size of the Yamato. The Yamato feared reprisals from Sila and Tang and so began consolidating defenses of Japan and in essence creating a single country modeled on Tang. This included changing the name from Wa to Nihon, installing a centralized, bureacratic state, starting the use of era names, and not long after, writing national histories, the Nihonshoki, and solidifying the ruling clans hold on power with the Kojiki. In a very real sense, this war created the two countries of Korea and Japan out of a more fragmentary collection of kingdoms and confederacies.
Actually, this was Saimei's second stint as ruler. She ruled earlier but abdicated when her son, the future emperor Tenji, assassinated the head of the Soga family inside the palace. The Soga had been virtual rulers for a while, and the links among the ruling clans in Yamato with different Korean dynasties were obviously an important element in the feuding. There was subsequently a lot of feuding and intrigue between Tenji amd his brother Tenmu who later became emperor.
The burial mound above the shrine.
A replica of a "water clock" said to have been invented by Tenji.