Back ground
The religious dispute between the pro-Shinto Mononobe clan led by Mononobe Moriya and the pro-Buddhist Soga clan led by Sogano umako which would eventually emerge victorious.
The decisive battle took place in July of 587 in this area of Yao. This temple is a monument of the battle.
Between July 1 and 2 the Soga are said to have been defeated in a series of engagements with the Mononobe. Mononobe had an upper hand first.
The Soga gradually retreated westward and by July 3 the demoralized Soga troops had finally concentrated in the area between Mount Shigi and Mount Ikoma.[2] Legend has it that at this point Prince Shotoku of the Soga cut down a sacred nuride tree, fashioned it into an image of four heavy king of Buddhism, and placed it on his forehead. Shotoku and Soga then both openly vowed to build a temple to the Four Heavenly Kings should they be victorious in the battle, which reenergized their men prior to the final confrontation In this final battle the turning point came when a Soga archer, named by the Nihon Shoki fired the arrow which killed Mononobe clan leader of Mononobe Moriya after which his forces were quickly routed.[2]
The main line of the Mononobe the most powerful opponent of Buddhism, was, together with its retainers killed in the battle. The survivors were dispersed, and some adopted a different name.
Shotoku has traditionally been credited with the founding of two temples which he is said to have had constructed following the battle: shitennoji and this temple.
After the battle is over this temple was build for those who sacrifised.