Over 1,100 years ago, this temple was opened by Joe Shonin (a Buddhist priest of Todaiji Temple in Nara Pref.).
At first, the name was Sesonji Temple (Shakyamuni Temple). During the Tengyo-no-Ran (Tengyo War) (939-940), Hidesato Fujiwara (the head of a powerful family of the Heian period) overthrew Masakado Taira (a general of the Heian period) using a curse and the emperor gave this temple the name Keisokuji.
The legend of Keisokuji Temple
In 939, Masakado Taira( a general of the Heian period) started the war that betrayed the Imperial Court.
During the next year, Hidesato Fujiwara fought with Masakado, obeying the emperor’s instructions.
At this time, the highest Buddhist priest of the Sesonji Temple prayed for Hidesato’s victory. Using Buddha’s teaching, he offered the neck of Masakado which was made of clay. He kept praying every day and every night.
Finally, on the eighth day, he fell asleep. In his dream, he found a hen who had three legs treading on Masakado’s bloody neck.
When he awoke to the hen’s laughing voice, he saw Masakado’s clay neck had three footprints clearly stamped on it. On the 17th day of the full moon, Hidesato beat Masakado.
The name of Sesonji Temple has thus changed to Keisokuji Temple.
Source: Keisokuji Temple