Is It Illegal to Be Gay in Iran? Laws, Penalties, and Enforcement

Yes, it is illegal to be gay in Iran. The Islamic Penal Code criminalizes same-sex sexual conduct, with punishments ranging from 31 lashes for kissing to death for penetrative acts between men. The law is written to target conduct rather than identity, but in practice, living openly as a gay person in Iran means constant exposure to severe criminal penalties, digital surveillance, and the risk of execution.

What the Law Criminalizes

Same-sex offenses sit in Book Two of the 2013 Islamic Penal Code, in a chapter covering sodomy, non-penetrative contact between men, and sexual contact between women. Most of these offenses are classified as hadd crimes, meaning violations of divine will with penalties fixed by religious law. A judge cannot reduce a hadd sentence based on the defendant’s age, circumstances, or sympathy. The statute sets the punishment and the judge applies it.

A smaller set of lesser same-sex acts, like kissing or touching motivated by sexual desire, fall under a separate category called ta’zir, where judges have some discretion within a statutory range. The distinction decides whether a defendant faces a fixed penalty or one a judge can adjust.

Penalties for Men

The code breaks male same-sex conduct into three tiers.

Penetrative Sex

Article 233 defines livat as penetration of a man’s genital organ into another male’s anus. Article 234 then separates the penalties for the two partners. The receptive partner faces the death penalty in every case, regardless of marital status or consent. There is no circumstance under the statute where that penalty is lower.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

For the insertive partner, two factors control the sentence: whether force was used, and whether the man meets a legal condition called ehsan. A man meets the ehsan threshold if he has a permanent wife of legal age with whom he has had vaginal intercourse and to whom he still has ongoing access. If force was used or ehsan applies, the penalty is death. Otherwise, it is 100 lashes. A separate rule provides that if the insertive partner is non-Muslim and the receptive partner is Muslim, the insertive partner faces death regardless of the other factors.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

Non-Penetrative Acts

Article 235 covers tafkhiz, defined as placing a man’s genital organ between another male’s thighs or buttocks without penetration. Article 236 sets the penalty at 100 lashes for both partners, with no distinction based on marital status, role, or whether force was used. The one exception mirrors the penetrative rule: if the active partner is non-Muslim and the passive partner is Muslim, the active partner faces death.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

Kissing and Physical Contact

Article 237 criminalizes same-sex kissing and touching motivated by sexual desire. This offense is ta’zir rather than hadd, so a judge has discretion. The penalty is 31 to 74 lashes.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

Penalties for Women

The code uses the term musaheqeh for sexual contact between women involving direct genital-to-genital contact. Article 239 sets the hadd penalty at 100 lashes for each person involved, with no distinction based on role or marital status.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

Article 237’s prohibition on kissing and touching out of sexual desire applies to women as well, with the same 31 to 74 lashes.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

The baseline penalty for musaheqeh is less severe than for male penetrative acts, but it can escalate to death through repetition. Article 136 provides that anyone convicted of the same hadd offense for the fourth time, after serving the prescribed punishment on each of the prior three occasions, faces the death penalty.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

How Convictions Actually Happen

The formal evidentiary standards for hadd convictions are demanding. Article 172 requires a confession to be made four separate times before a judge to count as legally valid. Without a confession, Article 174 requires four adult male witnesses who directly observed the act, meeting strict credibility requirements. Direct eyewitness testimony to private sexual conduct is rare.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

The common path to conviction runs through Article 211, which permits a judge to rely on personal knowledge, called elm-e qazi. Under this doctrine a judge can convict based on circumstantial evidence that produces personal conviction, drawing on expert opinions, crime scene inspections, statements from informed persons, police reports, and other material the judge finds convincing. The judge must state the grounds in the ruling, and purely deductive reasoning that would not persuade a reasonable person is excluded. In practice, this gives judges wide latitude to convict on police investigations, digital evidence, or medical examinations even where no confession or eyewitnesses exist.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

Enforcement Today

These are not dormant laws. One widely cited analysis documented at least 241 executions for same-sex activity between 1979 and 2020. In 2021, two men were executed on sodomy charges. In 2022, at least three more executions for same-sex conduct were reported. In 2023, two women had their death sentences overturned following sustained international advocacy, but those outcomes are exceptions.

Enforcement extends well beyond executions. In 2017, roughly 30 men were arrested at a private gathering in central Iran, transferred to prison, and charged with sodomy. In 2013, 17 people were detained after security forces raided a private birthday party suspected of being a gathering for gay men. Detention itself often involves interrogation, physical abuse, and coerced confessions. The U.S. State Department has noted that people accused of sodomy frequently face summary trials where the evidentiary standards are not consistently applied.

Digital Surveillance

Iranian security forces actively monitor dating apps, social media, and messaging services to identify people suspected of same-sex conduct. Human rights research has documented authorities infiltrating LGBTQ online spaces, including creating fake profiles on platforms such as Hornet and the Manjam dating site to arrange meetings that lead to arrests. Telegram chat groups have been a particular target, and administrators of LGBTQ-oriented groups have been arrested.

Evidence from these operations feeds prosecutions, interrogations about other alleged offenses, and blackmail. Digital communications about sexual orientation carry serious risk inside Iran even when they do not involve arranging a physical meeting.

“Corruption on Earth” as an Added Charge

Beyond the specific sexual offense statutes, Article 286 creates a broad category called “corruption on earth” (mofsed-e-fel-arz) that carries a mandatory death sentence. The offense reaches anyone who commits extensive crimes causing severe disruption to public order, including establishing or assisting places of “corruption and prostitution” or spreading “corruption” on a large scale.1Islamic Penal Code of the Islamic Republic of Iran. Islamic Penal Code of the Islamic Republic of Iran

The language is vague enough to encompass LGBTQ advocacy, organizing, or any activity the state characterizes as promoting homosexuality. Prosecutors have used digital evidence of “queerness” to pursue corruption-on-earth charges, which carry the death penalty without the repeat-offense requirement that applies to musaheqeh. For anyone engaged in community organizing or online advocacy inside Iran, this statute is an added layer of criminal exposure on top of the sexual conduct laws.

Gender Reassignment Is Legal, but That Is Not Acceptance

Iran permits gender reassignment surgery, which creates a confusing picture from outside. The two things are separate. A 1986 religious decree declared transition-related medical care permissible for people with gender identity issues, and the family courts handle authorization: an applicant obtains a referral to the Legal Medicine Organization for evaluation, receives a surgical permit if approved, and can then petition the court to order new identity documents after surgery.

The state frames this as correcting a medical condition, not as accepting diverse sexual orientations. One side effect is that some gay Iranians who do not identify as transgender face social or family pressure to undergo surgery to make their relationships appear heterosexual under the law. The framework does nothing to decriminalize same-sex conduct.

Risks for Travelers and Dual Nationals

Iran’s criminal laws apply to everyone inside its borders, including foreign nationals and tourists. The U.S. Department of State maintains a “Do Not Travel” advisory for Iran that warns of arbitrary arrest and detention and notes that U.S. citizens face the risk of detention on vague charges such as threatening national security. The advisory does not single out LGBTQ travelers, but the Penal Code provisions above apply regardless of citizenship.2U.S. Department of State – Bureau of Consular Affairs. Iran Travel Advisory

Dual nationals face compounded risk. Iran does not recognize dual citizenship, so the government treats Iranian-born dual nationals as Iranian citizens with no right to consular help from their second country. For LGBTQ people with Iranian heritage, a visit to see family can expose them to the full force of the Penal Code without diplomatic protection. Social media activity from abroad, including posts about sexual orientation or attendance at LGBTQ events, can become evidence if that person later enters Iran.

LGBTQ Iranians living abroad may qualify for asylum or refugee protection. At least 37 countries formally recognize persecution based on sexual orientation or gender identity as grounds for asylum, and Iranian LGBTQ refugees have reported police abuse, rape, and torture as reasons for fleeing. Research shows that roughly one-third of LGBTQ asylum seekers in Europe did not initially realize they could claim protection on these grounds. Anyone considering a claim should consult counsel familiar with LGBTQ refugee cases, since evidentiary requirements and procedures differ by country.