During ancient Egypt, there was a conception that deities involved in punishing the wicked existed in various caves and caverns; specifically in the nether regions. These are mentioned in the Spell of the Twelve Caves. This comes from a composition of a papyrus found and thought to come from the time of Amenophis II. It was located at Osireion at Abydos on the southern wall. This information can be found in the Book of the Dead as well.
It appears that the punishments consisted mainly of executions and beheadings and were conducted upon the enemies of Re. The twelve caverns depict alternating groups of anthropomorphic and mummy-type deities. A systematic numbering system was developed and listed to correspond with each of these gods along with their names. They included the type of offerings and sometimes listed information as to what a person could receive by providing gifts to the god.