Sodomy (ˈsɒdəmi), also called buggery in British English, generally refers to either anal sex (but occasionally also oral sex) between people, or any sexual activity between a human and an 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.
The term is derived from the Ecclesiastical Latin peccatum Sodomiticum, "sin of Sodom", which in turn comes from the Ancient Greek word Σόδομα (Sódoma). Genesis (chapters 18–20) tells how God destroyed the sinful cities of Sodom and Gomorrah. Two angels sent to the cities, are invited by Lot to take refuge with his family for the night. The men of Sodom surround Lot's house and demand that he bring out the strangers so that they may "know" them (a euphemism for sexual intercourse). Lot protests that the messengers are his guests and offers the Sodomites his virgin daughters instead, but then they threaten to "do worse" with Lot than they would with his guests. Then the angels strike the Sodomites blind, "so that they wearied themselves to find the door". (Genesis 19:4–11, KJV)
In current usage, the term is particularly used in law. Laws prohibiting sodomy were seen frequently in past Jewish, Christian, and Islamic civilizations, but the term has little modern usage outside Africa, Asia, and the United States.
These laws in the United States have been challenged and have sometimes been found unconstitutional or been replaced with different legislation.
The word sod, a noun or verb (to "sod off") used as an insult, is derived from sodomite. It is a general-purpose insult term for anyone the speaker dislikes without specific reference to their sexual behaviour.