A snake pit is, in a literal sense, a hole filled with snakes. In idiomatic speech snake pits are places of horror, torture and even death in European legends and fairy tales. The Viking warlord Ragnar Lodbrok is said to have been thrown into a snake pit and died there, after his army had been defeated in battle by King Aelle II of Northumbria. An older legend recorded in Atlakviða and Oddrúnargrátr tells that Attila the Hun murdered Gunnarr, the King of Burgundy, in a snake pit. In a medieval German poem, Dietrich von Bern is thrown into a snake pit by the giant Sigenot – he is protected by a magical jewel that had been given to him earlier by a dwarf.
In common metaphorical usage, a snake pit can mean any institution (such as a school, prison, hospital, or nursing home) or organization led in an inept or inhumane way, or an institution containing many people who may be hostile, untrustworthy, or otherwise treacherous ("snakes"). For example, the film The Snake Pit (1948) tells the story of a woman who finds herself in an insane asylum and cannot remember how she got there.
Terror was used on those deemed insane to try to make them sane again. Lowering the insane into a pit of snakes was a method of treatment.