Iran advanced a bill in parliament this week that would strengthen legal protections for transgender people in the country -- a seemingly contradictory step for a country where homosexuality is not only criminalized but in some cases punishable by death.

But the Islamic Republic’s decades-old recognition of transsexuality and its financial support for transgender Iranians seeking sex-change procedures is something experts argue has helped to reinforce the strict gender divide that continues to undermine LGBT rights more broadly in Iran.

The new bill, sent to parliament this week, would give transsexual Iranians more robust protections against possible police harassment, according to Farid Habibollah Masoudi, the deputy head of Iran’s social affairs assistance department.

“To better protect transsexuals, a draft bill on all aspects, judicial and religious, has been prepared and sent to parliament’s research center, which is examining it,” he said in remarks reported Wednesday by Agence France-Presse. “To prevent any problems because of their appearance, they are given a letter confirming their transsexuality so the police do not take action against them,” he said, adding that nearly 330 people had applied to have their trans status recognized over the past year.

Sex-change surgeries have been permitted in Iran since the 1980s, when the founder of the Islamic Republic, Ayatollah Khomeini, issued a fatwa, or religious decree, sanctioning the procedures. Khomeini, who helped lead the country’s 1979 Islamic Revolution, was said to have been moved after corresponding with a trans woman who described her feelings of being trapped in a man’s body. Iran’s current supreme leader, Ayatollah Ali Khamenei, has maintained his predecessor’s stance on the issue.

Since then, the country has not only permitted sex-change operations but has become a hub for these procedures, performing more than any country in the world except for Thailand. On top of this, the government has even subsidized the operations by providing state health insurance as well as health and housing aid for transsexual Iranians.

As important as these supports may be for transgender Iranians, there are nonetheless problematic issues underpinning this system, according to Iranian-American scholar and gender theorist Afsaneh Najmabadi.

“The increasing frequency of sex-change petitions and operations is not an unproblematically positive development, empowering though this trend has been for transsexuals,” she wrote in a 2008 paper published in the Women’s Studies Quarterly. “For legal and medical authorities, sex-change surgeries are explicitly framed as the cure for a diseased abnormality, and on occasion they are proposed as a religiously sanctioned option for heteronormalizing people with same-sex desires or practices.”

The state also tightly controls the process through its bureaucratic system of certifying “official” transsexuals -- a process that requires applicants to undergo psychotherapy along with hormonal and chromosomal tests. Transgender Iranians who are caught without these permits while dressed as the “opposite” sex are considered in violation of the law.

By framing these procedures as a corrective treatment and the only permissible option for people who do not conform to the state’s strictly defined gender roles, many LGBT Iranians end up feeling trapped between either being criminals or having to undergo a surgery they do not want.

One Iranian described the immense pressure placed on him to have the operation, in an interview with the BBC: "My father came to visit me in Tehran with two relatives," he said. "They'd had a meeting to decide what to do about me ... They told me: 'You need to either have your gender changed or we will kill you and will not let you live in this family.' If I'd gone to the police and told them that I was a homosexual, my life would have been in even more danger than it was from my family."