Being gay in Iran is a criminal offense that can carry the death penalty. The country’s Islamic Penal Code classifies same-sex sexual conduct among the most serious crimes in the legal system, and executions have been documented as recently as 2022. Beyond prosecution, LGBTQ Iranians face surveillance, coerced medical procedures, employment bans, and family violence with almost no legal recourse.
What the Law Criminalizes and What It Punishes
Iran’s 2013 Islamic Penal Code dedicates a full chapter to same-sex sexual conduct. Article 233 defines sodomy (liwat) between men, Article 235 covers non-penetrative sexual contact between men, and Article 238 defines sexual contact between women (musaheqeh).1Refworld. Iran: Islamic Penal Code2United Nations Office on Drugs and Crime. Islamic Penal Code of the Islamic Republic of Iran All fall under “hudud,” a category of offenses treated as divinely mandated. Once the evidentiary standard is met, judges have no authority to reduce the sentence, and the law draws no line between consensual and non-consensual conduct.
Penalties vary by the specific act and the accused person’s status. Under Article 234, the active partner in sodomy faces execution if he is married or if force was involved; an unmarried active partner in a consensual act faces 100 lashes. The passive partner faces execution regardless of marital status. A non-Muslim active partner is also executed when the passive partner is Muslim.2United Nations Office on Drugs and Crime. Islamic Penal Code of the Islamic Republic of Iran
Non-penetrative sexual acts between men carry 100 lashes for both parties. Sexual contact between women also carries 100 lashes for both.1Refworld. Iran: Islamic Penal Code In either case, a fourth conviction after three prior punishments escalates to execution.2United Nations Office on Drugs and Crime. Islamic Penal Code of the Islamic Republic of Iran
The statute does not prescribe a method of execution for sodomy; it is left to the judge. Hanging is the most commonly reported method. Documented executions for same-sex sexual conduct have continued into the 2020s, with cases reported in 2020, 2021, and 2022, including at least one public hanging.
How Prosecutions Actually Happen
The formal evidence bar looks nearly unreachable on paper. Article 232 requires either four separate confessions from the accused or testimony from four male witnesses who directly observed the act.2United Nations Office on Drugs and Crime. Islamic Penal Code of the Islamic Republic of Iran Hudud crimes are supposed to carry a deliberately high threshold because the punishments cannot be undone.
The system routes around that threshold through a doctrine called “knowledge of the judge,” which lets a judge convict on circumstantial evidence, forensic reports, or personal assessment of the case. That is where most prosecutions gain their footing. Article 241 also nominally bars authorities from investigating private sexual conduct when no credible evidence exists and the accused denies wrongdoing, but the article carves out exceptions for force, coercion, abduction, or harm.2United Nations Office on Drugs and Crime. Islamic Penal Code of the Islamic Republic of Iran Authorities routinely characterize same-sex cases as fitting those exceptions, or ignore the restriction. Detainees also reportedly face sustained psychological and physical pressure to confess, and retracting a confession does not automatically void a hudud conviction.
Much of the evidence that reaches a judge comes from digital surveillance. Iran’s Cyber Police, known as FATA, monitors social media, Telegram, and dating apps to identify LGBTQ users. Agents create fake profiles to build trust with targets, then arrange in-person meetings that end in arrest. In surveys of LGBTQ Iranians, roughly one in ten reported being entrapped through a dating app.
The 2009 Computer Crimes Law supplies the legal basis for this work. It criminalizes producing, sending, or distributing content deemed “immoral,” with the term left vague, and separately targets anyone who uses digital tools to “provoke” or “encourage” acts the state considers sexually deviant. Authorities have used these provisions to arrest Telegram channel administrators for “promoting homosexuality” and to charge people who used Facebook to arrange meetings. On arrest, phones and computers are confiscated and searched for contacts, messages, and photos, and one prosecution often cascades into several.
On the ground, the Basij paramilitary militia conducts local surveillance and raids on private gatherings, and the morality police patrol public spaces for appearance or behavior deemed inconsistent with state gender norms.
The Gender Transition Trap
Iran executes people for same-sex conduct and simultaneously subsidizes sex reassignment surgery. The policy traces to a fatwa issued by Ayatollah Ruhollah Khomeini in roughly 1986 or 1987 (the exact year is uncertain due to calendar differences), which declared gender transition surgery permissible under Islamic law for people the state defines as having a gender identity disorder. Public health insurance covers a significant share of surgical costs, modest grants are available on completion, and the state issues new birth certificates and identification documents reflecting the post-surgical gender.
The problem is who ends up being routed toward surgery. The state treats homosexuality and gender dysphoria as interchangeable. Medical professionals at state-run clinics have described being instructed to tell gay patients they are “sick” and need surgical correction, and psychologists report recommending reassignment to patients who are gay rather than transgender. Advocates working with this population estimate that a substantial percentage of people who undergo these surgeries are gay or lesbian.
The pressure comes from several directions at once: legal documents, permission to dress according to the person’s identity, loan assistance, and family threats. One documented account describes a young gay man whose family told him to either change his gender or be killed. Monitoring organizations have described these coerced surgeries as a form of torture or ill-treatment, particularly when patients are not given the information to understand that being gay and being transgender are distinct.
The state offers no middle ground. Someone who declines surgery and continues a same-sex relationship remains fully criminally liable. Even for transgender Iranians who do want to transition, the approval process can involve years of court hearings, mandatory counseling, virginity tests, and home visits by state welfare officials.
Life Beyond the Courtroom
Criminal prosecution is one layer of the threat. Civil and social consequences are another.
A “morality” record from an arrest or investigation can permanently bar someone from public sector employment and from private sector jobs that require government security clearance. Universities can deny admission or expel students suspected of violating moral codes or engaging in LGBTQ advocacy. Iran has no anti-discrimination protections for sexual orientation or gender identity in employment, housing, or education.
Family violence is a distinct danger with a legal dimension. Article 301 of the penal code bars retributive punishment when the perpetrator is the father or a paternal ancestor of the victim.2United Nations Office on Drugs and Crime. Islamic Penal Code of the Islamic Republic of Iran Combined with honor concepts, this means family members who harm a relative perceived as gay may face minimal legal consequences, and a person seeking protection against domestic abuse risks exposing themselves to prosecution for the underlying “offense.” Senior officials, including the Supreme Leader and the president, have publicly dehumanized LGBTQ people, framing them as immoral, corrupt, or agents of foreign influence.
Community exists, but it exists underground. LGBTQ Iranians rely on invitation-only gatherings in private homes, trusted networks built through school and university, and encrypted messaging apps to find partners and stay in contact. Long-distance relationships maintained entirely online are common, with people lying to family about their whereabouts to see partners. Managing a public persona that conforms to state expectations alongside a private self takes a constant psychological toll, and a single mistake can trigger prosecution, family violence, or social ruin.
Asylum Options for LGBTQ Iranians
For those who flee, international asylum systems offer a route to legal safety, though the process is long and uncertain.
Under U.S. law, persecution based on sexual orientation or gender identity qualifies as a basis for asylum under the “membership in a particular social group” category. Federal courts have recognized social groups defined by actual or perceived sexual orientation and actual or perceived gender identity. An applicant must show that their sexual orientation or gender identity was or will be “at least one central reason” for the persecution they faced or fear.3UNHCR. UNHCR’s Views on Asylum Claims based on Sexual Orientation and Gender Identity Persecution by family members or other private individuals can support a claim when the government is unwilling or unable to protect the applicant.
LGBTQ Iranians are not specifically designated under Priority 2 of the U.S. Refugee Admissions Program, which reserves open access for Iranian religious minorities such as Christians, Baha’is, and Jews. They may be referred individually under Priority 1 by UNHCR, a U.S. embassy, or a designated NGO based on their specific circumstances and need for resettlement.4U.S. Department of State. U.S. Refugee Admissions Program Access Categories
The common path runs through Turkey, where people wait for UNHCR processing and resettlement to a third country. The wait can stretch for years and conditions in transit are often precarious. Organizations such as the Iranian Railroad for Queer Refugees provide financial assistance, basic necessities, and sponsorship support for LGBTQ refugees in Turkey, and work with partners to facilitate resettlement in Canada and other countries.
A Note for Travelers and Dual Nationals
Iran’s laws apply to everyone within its borders, including tourists and dual nationals. The U.S. State Department classifies Iran as a Level 4 “Do Not Travel” destination, citing risks of terrorism, arbitrary detention, and wrongful detention of U.S. citizens, and the UK government advises against all travel to Iran.5U.S. Department of State – Bureau of Consular Affairs. Iran Travel Advisory
Iran does not recognize dual nationality. A U.S.-Iranian citizen entering Iran is treated solely as an Iranian national, and Iran will not permit Swiss consular officers, who handle U.S. interests, to visit detained U.S. citizens who also hold Iranian citizenship.5U.S. Department of State – Bureau of Consular Affairs. Iran Travel Advisory A dual national detained on morality charges would have no access to consular assistance and would be subject to the full penal code. Any foreign national whose phone or social media reveals same-sex relationships or LGBTQ advocacy is at risk of prosecution under both the penal code and the Computer Crimes Law.