Sodomy, also called buggery in British English, generally refers to either anal sex between people, or any sexual activity between a human and another animal (bestiality). It may also mean any non-procreative sexual activity. Originally, the term sodomy, which is derived from the story of Sodom and Gomorrah in the Book of Genesis, was commonly restricted to homosexual anal sex. Sodomy laws in many countries criminalized the behavior. In the Western world, many of these laws have been overturned or are routinely not enforced. A person who practices sodomy is sometimes referred to as a sodomite, a pejorative term.
François Elluin, Sodomites provoking the wrath of God, from Le Pot-Pourri de Loth, 1781
The Destruction of Sodom and Gomorrah, John Martin, 1852
Dante and Virgil interview the sodomites, from Guido da Pisa [it]'s commentary on the Commedia, c. 1345
Monks accused of sodomy burned at the stake, Ghent 1578
In the Abrahamic religions, Sodom and Gomorrah were two cities destroyed by God for their wickedness. Their story parallels the Genesis flood narrative in its theme of God's anger provoked by man's sin. They are mentioned frequently in the prophets and the New Testament as symbols of human wickedness and divine retribution, and the Quran also contains a version of the story about the two cities.
Sodom and Gomorrah afire by Jacob de Wet II, 1680
Sodom and Gomorrah's destruction in the background of Lucas van Leyden's Lot and his Daughters (1520)
Lut fleeing the city with his daughters; his wife is killed by a rock.