Gehenna is a rare case where a place of punishment in the afterlife can be traced to a specific piece of real geography. The name derives from the Valley of Hinnom (Gei Hinnom) just outside Jerusalem, a ravine that the Hebrew Bible associates with the worst of apostasies, the burning of children in sacrifice to foreign gods under the kings Ahaz and Manasseh (2 Kings, Jeremiah). Defiled by these associations, the valley became in later tradition a byword for divine judgement, and by the Second Temple period Gehenna had been transposed from a cursed valley into a realm of the afterlife: a place where the wicked are punished or purged by fire after death.
In rabbinic Judaism this developed into a nuanced doctrine, Gehenna as, for most souls, a temporary state of purification lasting up to twelve months, rather than eternal torment, after which the soul ascends; only the utterly wicked are destroyed or remain. The New Testament, using the same word (translated "hell" in older English Bibles), draws on this imagery for its warnings of judgement. Gehenna thus stands behind much later Jewish, Christian, and Islamic imagining of a fiery hell, while retaining, in its Jewish form, a strong emphasis on purification and limit rather than endless punishment.