Sodomy (synonymous with buggery) has the broad meaning of "committing unnatural sex acts", and specifically (1) copulation between two persons of the same sex or (2) copulation by a person with an animal (also known as "bestiality") or (3) noncoital (anal or oral) penetration by a man with a man or woman. Sodomy is most often associated with male homosexuality, where it is taken to mean anal intercourse. Most countries outlaw bestiality but homosexual activity is gradually being decriminalized. Heterosexual sexual intercourse falling into this category is largely legal.
If sodomy is committed by force, the passive partner may suffer painful injuries. Sodomy committed by force, threat of force, or impairment of victim's ability to decide through drugs or alcohol or with an under-age child is considered to be a crime parallel to rape. Unprotected anal sex is the riskiest kind of sex for transmitting sexually transmitted diseases, including AIDS. HIV, the virus that causes AIDS, can pass across an anus-lining even if it is intact. The risk is even greater in circumstances where dildos or fisting (in which the hand is used as the organ of anal penetration) may have torn the lining. In addition, the rectum is home to lots of infectious bacteria that can subsequently cause burning and urethritis of the inserted penis. Damage to the lining of the rectum may also provide access for many infectious agents into the blood stream.
Sodomy occurs between men in tribal society, often as part of an initiation rite and among male homosexuals in sophisticated societies. It may occur because of lack of opportunity for vaginal intercourse, or what developmental psychologists call the fixation of libido at the stage where sexual interest is centred on the anus, or as a dominance phenomenon. The practice is common in male prisons, where it may be voluntary or take the form of rape.
In some cultures where a high premium is placed on female virginity, anal sex is a preferred form of heterosexual sex for the unmarried.