Is Being Gay Illegal in Iran? Laws, Penalties, and Enforcement

Yes, being gay is illegal in Iran. The 2013 Islamic Penal Code criminalizes every form of same-sex sexual activity, and the penalties run from 31 lashes at the low end to execution at the high end. The law applies to men and women, to citizens and non-citizens, and to consensual conduct between adults in private. There is no civil partnership status, no anti-discrimination protection, and no safe legal space for same-sex relationships of any kind.

What the Law Criminalizes

The governing statute is the 2013 Islamic Penal Code, ratified by the Guardian Council and drawn directly from Sharia principles. It treats same-sex sexual conduct as a category of morality offense and sorts it into separate provisions for men and women, each with its own definitions and sentencing range.

Judges have unusually wide latitude in these cases. Iranian law recognizes a principle called “knowledge of the judge” (elm-e qazi), which lets a judge convict based on personal certainty rather than the formal evidence the code otherwise requires. That principle shapes everything that follows, because the procedural safeguards written into the statute can be set aside at the judge’s discretion.

Penalties for Men

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

The most serious is livat, defined in Article 233 as penetrative anal intercourse between males. Article 234 sets the sentences by role and circumstance. The passive partner faces the death penalty regardless of marital status. The active partner faces the death penalty if he is married or used force, and 100 lashes if he is unmarried and no force was used. A non-Muslim active partner with a Muslim passive partner faces death. “Married,” for this provision, means a man with a permanent wife of legal age with whom he has had intercourse and to whom he continues to have access.1United Nations Office on Drugs and Crime. Islamic Penal Code of the Islamic Republic of Iran

The second tier is tafkhiz, covered in Article 236. This is sexual contact between men that falls short of penetration. Both parties receive 100 lashes, and marital status and the use of force do not change the sentence. The exception again involves religion: a non-Muslim active party with a Muslim passive party faces the death penalty.

The third tier, Article 237, covers acts like kissing or touching motivated by sexual desire that do not meet the definitions above. The sentence is 31 to 74 lashes. The article states explicitly that the provision applies equally to women.1United Nations Office on Drugs and Crime. Islamic Penal Code of the Islamic Republic of Iran

Penalties for Women

Articles 238 through 240 address sexual contact between women, called musaheqeh in the code. Article 240 sets the punishment at 100 lashes per conviction. The code draws no distinction based on role, marital status, or the use of force. Both parties receive the same sentence.2Refworld. Iran: Islamic Penal Code

Repeat convictions carry a far graver consequence. Article 136 provides that a person convicted of the same flogging-level offense three times, and punished each time, receives the death penalty on the fourth conviction. This rule applies to musaheqeh, and in theory to tafkhiz and other repeated flogging offenses as well.2Refworld. Iran: Islamic Penal Code

How Convictions Actually Happen

On paper, the evidentiary bar is high. A confession-based conviction requires the accused to confess four separate times before a judge. A witness-based conviction requires four male witnesses to the act, or three male and two female witnesses. With fewer male witnesses, the death penalty for livat is off the table, though two male and four female witnesses can still support a flogging conviction for tafkhiz or musaheqeh.

In practice, the “knowledge of the judge” principle collapses these protections. If the judge reaches personal certainty of guilt from circumstantial evidence, that certainty is enough to convict and sentence, including to death. The code requires only that the judge’s knowledge rest on “clear evidence presented to him,” without defining the term. Human rights organizations have called the standard subjective and arbitrary, and have documented cases where judges invoked it to override statutory limits, including protections for minors.

Executions and Active Enforcement

These laws are enforced. Between 1979 and 2020, at least 241 people were reportedly executed for same-sex conduct in Iran. The pattern has continued. In 2021, two men were executed on charges related to same-sex acts. In 2022, at least two more executions were reported, along with a separate execution that monitors described as based on a “sodomy” conviction. That same year, two women were sentenced to death on charges activists said targeted them for LGBTQ advocacy; those sentences were later overturned on appeal.

Minors have been executed under these provisions. In 2016, a 17-year-old boy was hanged following a conviction he maintained throughout the proceedings was based on consensual conduct.

Transgender Status Is Treated Separately

Iran’s criminalization of homosexuality sits alongside a legal pathway for transgender individuals, and the two should not be confused. A 1987 fatwa by Ayatollah Khomeini declared gender reassignment surgery permissible under Islamic law, and that ruling remains the basis for a state-recognized process involving psychiatric evaluation, Legal Medicine Organization authorization, and court approval. After surgery, individuals can update their birth certificate and national identification.

The existence of this pathway does not soften the position on homosexuality. Allegations have persisted for years that gay and lesbian Iranians face pressure from authorities to undergo surgery as a way of “resolving” their sexuality by moving them into a recognized legal category. International researchers have not been able to systematically verify the scope of this coercion, but the structural incentive is visible in the law itself: a legal route for transgender people, a capital offense for same-sex conduct.

No Recognition for Same-Sex Relationships

Iran provides no legal framework for same-sex partnerships. There is no marriage, civil union, or domestic partnership status, and no path to create one through private contract, because courts may refuse to enforce agreements tied to a criminalized relationship.

The financial consequences flow from this absence. Under the Iranian Civil Code, inheritance passes only through blood relationship or permanent marriage, so a same-sex partner has no standing to inherit regardless of how long the relationship lasted or what the partners agreed to privately.3Iran Data Portal. Inheritance Law Property ownership stays individual. There are no survivor benefits, no spousal healthcare access, and no authority to make legal or medical decisions for an incapacitated partner.

Public Sector Employment Screening

A separate layer of exclusion comes from the Gozinesh Law, first enacted in 1985. It requires anyone seeking public sector employment to demonstrate devotion to Islam and allegiance to the Islamic Republic through an ideological screening process. Proposals to replace it with merit-based hiring have been rejected by both Parliament and the Guardian Council.

The process formally targets religious minorities and those deemed politically unreliable, but its ideological framework creates clear risk for anyone whose personal life conflicts with the state’s moral expectations. An LGBTQ applicant whose situation surfaces during vetting faces disqualification from government work and potential exposure to criminal investigation. The private sector offers no formal protections either, and Iranian labor law provides no remedy for discrimination based on sexual orientation or gender identity.