KARACHI, Pakistan — Four years ago, Pakistan stepped to the forefront of transgender rights worldwide, enacting a law that prohibits discrimination against transgender people in schools, workplaces and public settings, and guarantees them the right to choose their gender on official documents.
Pakistan, a nation known for religious conservatism that still outlaws same-sex relations, joined a small list of countries — only about a dozen at the time, according to the United Nations — with similar transgender protections written into law, raising hopes for a historic turn in the lives of people long forced to survive on society’s fringes.
It meant, for some, that they could emerge from the shadows, a moment captured by the debut that year of Marvia Malik, the country’s first transgender television news anchor.
But in Pakistan, as in other countries around the world, guarantees written into law do not always translate to reality, do not erase prejudices and, most acutely, do not ensure security. A spate of violent attacks in Pakistan, several of them fatal, have targeted transgender people.
In the span of several days in March, four transgender people were killed and others were injured in a series of attacks in northwestern Pakistan. In one instance, gunmen on motorcycles opened fire on transgender people in Mardan, killing one and wounding another, according to local reports.
“We welcome the passage of the laws to protect the transgender community’s rights, but changing the society’s mind-set is a big challenge,” said Bindiya Rana, a transgender community leader in Karachi. “A certain section of people consider transgender persons either their property or as less than human.”
Compared with years past, said Dr. Sarah Gill, a transgender physician who recently began working at Karachi’s major public hospital, “the transgender community is more inclined toward getting education and respectable jobs,” but enormous obstacles remain.
Prominent conservatives have denounced the law, calling the push for transgender rights anti-Muslim and a liberal Western conspiracy. Facing continued discrimination and violence, many transgender people live as they did before 2018, hiding their identities, shunned by their families, denied medical care and huddling together in group homes for safety.
Global data collected by the Trans Murder Monitoring project, funded by the European Union, shows that Pakistan has recently averaged about 10 homicides of transgender people annually — more than before the law passed, and, relative to population, far more than its neighbors. Most often the victims are transgender women. Rights groups say the true figures are much higher, as many hate crimes go unreported.
“The continuing brutal attacks on transgender women in Pakistan will only end when authorities signal that they will hold the attackers to account,” said Saroop Ijaz, the senior counsel in the Asia division of Human Rights Watch.
Well-known people have been targets of assault, including Rimal Ali, a transgender model. In the city of Lahore last year, an attacker shaved her head and eyebrows.
“It is becoming difficult for transgender persons to live peacefully,” said Arzoo Khan, a transgender person who heads a rights organization in Peshawar. “Families had already abandoned us, society does not tolerate us, and now, some groups are killing, sexually assaulting and looting us.”
In some countries, diverse gender identity is legally classified as a crime or medical pathology. In others, claiming one’s gender identity under the law and on official documents is allowed only under onerous conditions, ranging from psychiatric evaluations to mandatory hormone treatment and transition surgery.
In many countries, discrimination is neither enshrined nor prohibited in legislation, though it may be curbed by court rulings. In the United States, states have widely varying laws and precedents; while federal statutes do not explicitly address transgender rights but they are protected under a number of court rulings and government policies.
With the legislation enacted in 2018, Pakistan appeared to cut through that morass, allowing people to designate their gender unhindered and to live without discrimination. To many people, it was an extension of South Asia’s centuries-old history of transgender — or “third gender,” a term some now reject — people living openly, with relatively greater acceptance than in much of the world.
But enforcement of the law has been inconsistent in the country’s provinces, which are responsible for local implementation of federal policies across fields like health, education, security and family law. That has forced activists to campaign in each province for the legal protections to take effect.
While the law includes a provision calling for the establishment of protection centers, where transgender people can access mental health services, legal services and temporary housing, only one has opened so far, in Islamabad, the capital.
Trans activists say that anywhere in the world, fighting for rights and gaining a higher profile can draw a backlash.
“Everybody says for you to progress your movement as a social justice movement, as a group of people who are marginalized and oppressed, you need to be more visible,” said Tuisina Ymania Brown, a secretary general for the International Lesbian, Gay, Bisexual, Trans and Intersex Association, adding, “But bear in mind, there is some violence to that visibility.”
Brazil has legal protections, on paper, and a relatively visible trans community, yet it has by far the highest number of recorded murders of transgender people in the world — more than 100 in most years.
Brazil’s Supreme Court has criminalized transphobia and scrapped barriers to trans people officially changing their name and sex. But Brazilian trans activists say their rights remain fragile, neither codified by lawmakers nor consistently observed by officials.
“The battle for our rights has been fought in the courts and on the streets,” said Indianara Siqueira, a Brazilian trans rights activist. “If it weren’t for the pressure we apply to society, we wouldn’t even have a right to exist in this country.”
In Pakistan, same-sex sexual activity is not only illegal, as it is in dozens of countries, it can be punishable by execution. How that applies to transgender people remains murky, but some Pakistani courts and Muslim clerics have said that a transgender person can marry, as long as the two partners have different gender expressions.
Even so, some public figures have pushed back hard against the expansion of transgender rights.
“The West has been pressuring Pakistan to promote vulgarity,” said Qari Bashir Qadri, an Islamic cleric in Karachi, adding, “but the country’s Muslim population will not allow the conspiracy to make the country a liberal country through such measures.”
Mushtaq Ahmed Khan, a lawmaker from the country’s Islamist party, said in May on the Senate floor that the transgender rights law violates Islamic injunctions and “will be destructive for the family system.”
After the United States Embassy in Islamabad posted on Twitter in May in support of “the human rights of the LGBTQI+ community,” a student group belonging to the Islamist party responded in a tweet that Pakistan “knows well to protect its values, so the US and all like-minded ones should never dare to transgress the boundaries.”
Even so, a younger generation of transgender Pakistanis connected to the global rights movement has been more vocal and ambitious than its predecessors. Nisha Rao, 29, one of Pakistan’s first transgender lawyers, said that by pursuing higher education, she is actually fighting the discriminatory perception of the community in society.
“It is the education that is making a difference and helping the community to fight the harsh perceptions about them,” she said.
A transgender woman, Reem Sharif, joined the Rawalpindi police as an adviser. Dr. Gill has been described as the country’s first transgender physician.
Pakistan’s 2018 law “was a great step forward,” one that most of the world has not yet taken, said Maria Sjödin, the acting executive director of OutRight Action International, a nonprofit focused on global L.G.B.T.Q. rights.
“But it just can’t stop there.”
Ana Ionova contributed reporting from Rio de Janeiro.