It is said that it used to be a temple called Kaizo-ji Temple, and is thought to have been built near a settlement mentioned in a literary work such as 'Fukatsu City' recorded in "Nihon genho zenaku ryoiki" (set of three books of Buddhist stories, written in the late 8th and early 9th century, usually refer to as the Nihon ryoiki) or 'Fukatsuso' recorded in "Horyu-ji Garan Engi narabini Ruki Shizai Cho" (note of origin and materials of Horyu-ji Temple).
かつては「海蔵寺」の名の寺院であったとされを伝えて、「日本現報善悪霊異記」にある「深津市」、「法隆寺伽藍縁起并流記資財帳」にみる「深津荘」などの文献にある集落付近に建立されていたと考えられている。