Snake pits were a historical European means of imposing capital punishment. Convicts were cast into a deep pit containing venomous snakes, such as vipers. They died from snake venom poisoning as the irritated snakes attacked them. An example of execution by this method is that of the Viking warlord Ragnar Lodbrok in 865, after his army was defeated in battle by King Aelle II of Northumbria.
An older legend recorded in in Atlakviða and Oddrúnargrátr tells that Attila the Hun murdered Gunnarr, the King of Burgundy, in a snake pit.
A similar penalty appeared in ancient China during the Five Dynasties and Ten Kingdoms Period (907-960). The southern Han, one of the states, had a penalty in which a prisoner was thrown into a pool of water containing hundreds of venomous snakes. Soon the prisoner was killed by thousands of snake bites.
In common usage, "snake pit" can mean an institution (such as a school, prison, hospital or nursing home) or organisation led in an inept or inhumane way.