According to a Buddhist scripture, "Kyoten (Buddhist Scripture) Daizo-kyo Sutra" (the Tripitaka), it was the transformation of a spirit that rose from a new corpse.
経典『経典大蔵経』によれば、新しい死体から生じた気が化けたものとされる。