Ultimately the woman remarried and the jealous demon once again bit off her second hubby’s penis. This caused the upset villagers to cook up a plan to fool the demon. A local blacksmith built a steel phallus, and upon insertion into the woman’s vagina, the demon’s teeth were broken and he left her vagina forever.
Soon after, the happy ending was memorialized through the Kanamara Matsuri and the enshrinement of the real steel phallus at Kanayama Temple, built to honor Kanayama Hikonokami and Kanayama Himenokami, the Shinto gods of childbirth and lower abdominal health.