Before the Islamic Revolution in 1979, the issue of trans identity in Iran had never been officially addressed by the government. Beginning in the mid-1980s, however, transgender individuals were officially recognized by the government and allowed to undergo sex reassignment surgery. As of 2008, Iran carries out more sex change operations than any other nation in the world except for Thailand. The government provides up to half the cost for those needing financial assistance, and a sex change is recognised on the birth certificate.
In 1963, Ayatollah Ruhollah Khomeini wrote a book in which he stated that there was no religious restriction on corrective surgery for intersex individuals, though this did not apply to those without physical ambiguity in sex organs. At the time Khomeini was a radical, anti-Shah revolutionary and his fatwas did not carry any weight with the Imperial government, which did not have any specific policies regarding transgender individuals.
The new religious government that came to be established after the 1979 Iranian Revolution classed transgender people and crossdressers with gays and lesbians, who were condemned in shah's era and faced the punishment of lashing or even death under Iran's penal code.
One early campaigner for transgender rights was Maryam Hatoon Molkara, who had been assigned male at birth but identified as female. Before the revolution, she had longed to become physically female but could not afford surgery and wanted religious authorization. In 1975, she began to write letters to Khomeini, who was to become the leader of the revolution and was in exile. After the revolution, she was fired, forcedly injected with male hormones, and institutionalized. She was later released with help from her connections and continued to lobby many other leaders. Later she went to see Khomeini, who had returned to Iran. During this visit, she was subjected to beatings from his guards. Khomeini, however, did give her a letter to authorize her sex reassignment operation, which she later did in 1997. Due to this fatwa, issued in 1987, transgender women in Iran have been able to live as women until they can afford surgery, have surgical reassignment, have their birth certificates and all official documents issued to them in their new gender, and get married to men.
Khomeini's original fatwa has since been reconfirmed by the current leader of Iran, Ali Khamenei, and is also supported by many other Iranian clerics. However, there is still a great deal of stigma attached to the idea of transgender and gender reassignment in ordinary Iranian society, and most transgender people, after completing their transition, are advised to maintain discretion about their past. Once a transgender individual has undergone sex reassignment, that person legally becomes the new sex. All legal documents, such as birth certificates and passports, are also changed accordingly.
Hojatoleslam Kariminia, a mid-level cleric who is in favor of transgender rights, has stated that he wishes "to suggest that the right of transsexuals to change their gender is a human right" and that he is attempting to "introduce transsexuals to the people through my work and in fact remove the stigma or the insults that is attach to these people."
UNHCR's 2001 report says that sex reassignment surgery is performed frequently and openly in Iran, and that homosexual and cross-dressing people, although unrelated to trans identity, would be safe as long as they keep a low profile. However, the Safra Project's 2004 report considers UNHCR's report over-optimistic. The Safra Project's report suggests that UNHCR underestimated legal pressure over transgender and LGBT matters.
The Safra Project report further states that currently, it is not possible for presumed transgender individuals to choose not to undergo surgery - if they are approved for sex reassignment, they are expected to undergo treatment immediately. Those who wish to remain "non-operative" (as well as those who cross-dress and/or identify as genderqueer) are considered their biological gender, and as such they are likely to face harassment as being homosexuals and subject to the same laws barring homosexual acts.