Sodomy (IPA: ) is a term of biblical origin used to characterize sexual acts that have been attributed to citizens of ancient Sodom. In the Middle Ages, sodomy was defined as sexual acts not related to procreation and therefore deemed counter nature, specifically sexual acts between members of the same sex. More recent definitions of the terms include sexual acts other than coital sex between a male and female. Therefore the range includes everything from anal penetration to oral sex to masturbation to paraphilia. It is sometimes used to describe human-animal sexual intercourse (also known as bestiality or zoophilia); this is the primary meaning of the cognate German language word Sodomie. Sodomy laws forbidding certain types of sex acts have been instituted in many cultures.
The English term buggery is very closely related to sodomy, in concept, and often interchangeably used in law and popular speech. In the various criminal codes of United States of America, the term "sodomy" has generally been replaced by "Deviant sexual intercourse", which is precisely defined by statute. The remaining criminal interest is largely confined to acts where the victim did not or could not legally consent.