Lesbian, gay, bisexual, transgender, and queer (LGBTQ) people in Iraq face severe challenges not experienced by non-LGBTQ residents. Openly LGBTQ individuals are subject to criminal penalties under the 2024 law making homosexual relations punishable by up to 15 years in prison with fines and deportation; the 2024 law also criminalizes and makes punishable by prison time promoting homosexuality, doctors performing gender-affirming surgery, and men "deliberately acting like women". Discrimination is also widespread. Openly gay men are not permitted to serve in the military and same-sex marriage or civil unions are illegal. LGBTQ people do not have any legal protections against discrimination and are frequently victims of vigilante justice and honor killings.

Following British occupation of Iraq, very strict sodomy laws were put in place. These laws allowed discrimination, harassment, and murders of members within the Iraqi LGBTQ community. Once Iraqi independence was achieved, these laws still remained. In recent years, leaders within Iraq have spoken out about reducing sodomy laws within the country. Regardless of the reduced laws, discrimination, harassment, and murders of LGBTQ community members still persist.

The Iraqi government has maintained an anti-LGBTQ stance since gaining independence in 1932 where homosexuality was officially banned. This would be expanded in the IRCC Resolution 234 of 2001 which would punish sodomy, or any homosexual act, with the death penalty. Due to harsh stigma against people who are LGBTQ, many activist organizations find themselves at a crossroads of whether to focus on building tolerance in Iraq, or instead focusing on ensuring safety or asylum for the LGBTQ communities. In 2024, there were plans to make homosexual relations in Iraq punishable by up to death but the law was revised before being quietly passed later that year to lower the punishment to 15 years in jail with fines and deportation.

LGBT history in Iraq and the legality of same-sex sexual activity Ancient Mesopotamia In the Epic of Gilgamesh, which was composed in the Mesopotamian kingdom of Sumer, the relationship between the main protagonist Gilgamesh and the character Enkidu has been seen by some to be homosexual in nature.

The Šumma ālu, an Akkadian tablet, includes this code, where it regards male homosexuality in a positive light:

If a man copulates with his equal from the rear, he becomes the leader among his peers and brothers.

In the ancient Assyrian society, the Almanac of Incantations featured prayers praising the equality of love between heterosexual and gay male couples.Homosexuality, a History, authored by Vern L. Bullough, New American Library, 1979, page 53 A man had the rights to visit any gay prostitute or sleep with another man, just as long as false rumors or rape were not involved. Nevertheless, a man taking the submissive role was perceived negatively in ancient Mesopotamia.

A particular Middle Assyrian Law Code from Assur, dating from 1,075 BC, condemns homosexual rape or forced sex. It speaks of a "seignior" (high social figure in the community) and his "neighbor" (someone of equal social status):Ancient Near Eastern Texts Relating to the Old Testament, edited by James Pritchard, 3rd edition, Princeton University Press, 1971, page 181

If a seignior [an Assyrian man] lay with his neighbor [another citizen], when they have prosecuted him (and) convicted him [the first citizen], they shall lie with him (and) turn him into a eunuch.

Islamic and medieval era Islam became a major religion in the region following the first Arab conquest of the region in the 7th century. However, despite the prohibit the region continued up to the present.

Ottoman and British rule In 1858, the Ottoman Empire, which ruled the area of modern-day Iraq as part of Ottoman Iraq province, abolished its existing sodomy laws. The assumption of control over the three vilayets of the province by the British (as a League of Nations mandate known as the British Mandate of Mesopotamia) imposed a ban on homosexuality, defined in the penal code as sodomy on the province which would remain well after independence in 1932. A notable singer in Iraq from c.1925 to 1944 was the Ahwari folk musician Masoud El Amaratly, who was assigned female at birth but lived his life as mustarjil.

Republic of Iraq The Criminal Code of 1969, enacted by the Ba'athist party, only criminalized sexual behavior in cases of adultery, incest, rape, prostitution, public acts, or cases involving fraud or someone unable to give consent due to age or mental defect. Homosexuality per se was not a crime, but could be justification for government discrimination and harassment under laws designed to protect national security and public morality.

From the enactment of this code in 1969 to 2001, Iraqi security forces had considerably leeway to harass, jail or even execute anyone deemed to be a threat to national security or public morality. LGBTQ people could be harassed, jailed or blackmailed into becoming spies for the regime.

No LGBTQ-rights organization was allowed to exist in Iraq, and laws designed to specifically discriminate against LGBTQ people began to appear in the 1980s. Sodomy was re-criminalized by a 1988 resolution, but only when it involved prostitution. [Combating Prostitution Law No. 8 of 1988].

The Iraqi Law of Personal Status was amended in the 1980s to specifically permit a wife to divorce her husband in cases where the husband was guilty of a homosexual relationship. The practice of "honor killing" was also made legal in the family law code, which meant that LGBTQ people could be killed by a family member for bringing "shame" or "dishonor" to the family.

When the AIDS-HIV pandemic reached Iraq in 1986, Saddam Hussein believed that the disease could be spread by casual contact, and thus ordered all Iraqis with the disease to be relocated to a special prison facility. Widespread ignorance about the disease meant that all Iraqis with hemophilia, along with homosexuals, were often suspected of carrying the disease.Fisher, Ian (October 2003). "Iraqi AIDS Patients Faced Confinement as Well as Pain and Death". New York Times.

After the war with Iran, Saddam Hussein felt the need to increase his support among Iraqis with more traditionalist Islamic social values through a movement known as the Faith Campaign, a large campaign to reshape Saddam Hussein's image from that of a secularist to that of a champion of traditional Islamic morality. One of the ways that the government achieved this was through strong, and public, opposition to LGBTQ people.

As part of this, in the early 1990s, at the United Nations, the Iraqi delegation cited religion at the time as their reasoning for opposing efforts to have the international body support for LGBT rights.Republic of Fear: The Politics of Modern Iraq, authored by Kanan Makiya, University of California Press, 2008, page 215

In the summer of 1993 compulsory religious education was introduced into Iraqi schools. Nightclubs accused of harboring prostitutes were closed and the constitution was amended to include the death penalty for homosexuality.

In 1995, Saddam Hussein created a new military unit called Fedayeen Saddam ("Saddam's Men of Sacrifice") to punish Iraqis whose behavior or life-style was deemed to be in violation traditional Islamic mores. This group operated similar to an armed Mutaween (religious police), and often staged public torture and executions of LGBTQ people as women who had sex outside of marriage. Approximately 3,000 people were tortured from 1991 to 2003 by Saddam Hussein's security forces for expressing their sexuality.

In 1999, an urban legend began to circulate that the Iraqi government banned the South Park television series, and feature film, because it depicted Saddam Hussein being involved in a homosexual relationship with Satan. While the film would not have been approved by the Iraqi censorship board, Western filmmakers did not attempt to exhibit films in Iraq because of the economic sanctions.

In 2001, the IRCC Resolution 234 of 2001 was enacted. This established the death penalty for adultery, being involved with prostitution, and anyone who, "Commits the crime of sodomy with a male or female or who violates the honor of a male or female without his or her consent and under the threat of arm or by force in a way that the life of the victim (male or female) is threatened."

With the intention of discrediting Saddam Hussein with his supporters, the CIA considered making a video in which he would be seen having sex with a teenage boy.

American occupation of Iraq When Coalition Provisional Authority Chief executive Paul Bremer took control of Iraq following the U.S. invasion in 2003, he issued a series of decrees that restored the Iraqi criminal code back to the Iraq penal code of 1969 (as revised in 1988), abolishing the death penalty (which the newly formed Iraqi government restored in 2005), and removing most restrictions on free speech and assembly.

Despite this, starting in 2003, large waves of harassment and violence against LGBTQ people from family members and other Iraqis who felt the need to punish people for violating traditional Islamic laws could be seen, with many people outside of the LGBTQ community, ranging from journalist, citizens, and even some politicians in Iraq, reporting how brutal many of the attacks were. It is around this time that many LGBTQ activist organizations, such as The Organization of Women's Freedom in Iraq and Iraqi LGBTQ, started to form in response to the growing violence. The largest amounts of murder and death would happen during this time period, and despite the formation of many LGBTQ activist organization, many would be forced to disband, go underground, or travel to different countries to continue work there.

On February 5, 2005, IRIN News agency (now The New Humanitarian) issued a report titled "Iraq: Male homosexuality still a taboo". The article stated, among other things, that "honor killings" by Iraqis against a gay family member are common and given some legal protection. The article also stated that the 2001 amendment to the criminal code stipulating the death penalty for homosexuality "has not been changed", even though Paul Bremer clearly ordered the criminal code to go back to its 1980s edition.

Since 2005, there have been reports that the Supreme Council for the Islamic Revolution in Iraq's Badr Organization has been involved in death squad campaigns against LGBTQ Iraqi citizens, and that they are supported in these policies by the Grand Ayatollah Ali al-Sistani. New barbaric attacks, with 90 victims, are reported in the first months of 2012.Iraq was already Hell for gays, now it's even worse, in MOI Musulmani Omosessuali in Italia

These reports seem to stem from a fatwa issued by Iraqi cleric Grand Ayatollah Ali al-Sistani stating that homosexuality and lesbianism are both "forbidden" and that they should be "Punished, in fact, killed. The people involved should be killed in the worst, most severe way of killing".

Early drafts in English of the 2005 Iraqi constitution contained a provision that asserted that none of the rights or liberties protected in the Constitution would apply to "deviants". Later revisions of the Iraqi Constitution removed the deviants clause. Several clauses throughout the revised document assert that Islam will be the foundation of the law and that various civil liberties shall be limited by "public morality".

The Iraqi civil war's end in 2008, saw a decrease in violence for people's daily lives, and this allowed a surge in nightlife, including gay nightlife, in Baghdad, Basra, Najaf, and other cities for people in the LGBTQ community. This, however, also allowed the Sadrist militiamen of the Mahdi Army to reposition themselves to killing LGBTQ people.