Pakistan is one of the most conservative countries in the world, one that still considers homosexuality a crime, condones child marriage, and has attempted to legalize spousal abuse.

That makes its decision to start issuing passports with a separate gender category, X, for transgender citizens all the more surprising. Pakistani citizens will now be able to self-identify with the third option, instead of just identifying with male or female.

Trans Action Pakistan, an advocacy organization for Pakistan’s transgender community, shared a post on its Facebook page saying that the president of the organization, Farzana Jan, was the first person to have a passport carrying the transgender identity.

ANOTHER MILESTONE ACHIEVED After a long struggle we are able to make another change. Now the the Govt of Pakistan is... Posted by Trans Action Pakistan on Friday, June 23, 2017

This may come as surprise for a country in which transgender individuals are frequently violently attacked and are often refused assistance by medical providers and police.

But Pakistan’s government has been relatively progressive when it comes to acknowledging transgender rights. In 2012, trans activists won a legal battle to include a third gender identity option on national identity cards. Earlier this year, Pakistan started allowing members of the trans community to identify themselves as such in the 2017 census. And a new mosque inclusive of people with all gender and sexual identities is planned in Islamabad, the capital city.

A lot of that has to do with Pakistan’s contradictory relationship with the hijra transgender community. Hijra is a term used in South Asia for transgender women, who have been recognized in society as good luck since the 16th century, according to NPR. They typically don’t identify as either male or female and were often considered religiously powerful in Hinduism (though some hijras are Muslim, especially in Pakistan).

The hijras are undoubtedly discriminated against, facing harassment by police and sexual assault. But they often play an important traditional role at weddings and other ceremonies in South Asian countries, including Pakistan and India, according to my colleague Zack Beauchamp. Their paid performances are believed to confer real benefits like fertility.

While estimates of the hijra population vary, it’s commonly estimated that several million people identify as such in South Asia. About 50,000 Pakistanis are considered hijra, according to NPR.

So because of the hijra community’s prevalence, combined with ongoing pressure by transgender activists, Pakistan is taking steps to legally recognize this marginalized population. The new passport act is one part of that.

Pakistan isn’t the first country to allow a third gender identity on passports

Pakistan joins a handful of countries around the world — including India, Germany, New Zealand, and Nepal — that allow a third gender category on passports. Even more countries allow transgender individuals to change their identity on legal documents without providing official medical documents.

Sadly, the US isn’t one of them. American passports only allow the binary choice of male and female. A policy announced in 2010 allowed transgender citizens to change the gender identity listed on their passports from male to female, or vice versa, but only with a medical certification that proves gender transition.

Pakistan, in other words, is in some ways more progressive on transgender issues than the US. That speaks well of Pakistan. It doesn’t speak well of America.