On Sundays, Shinta Ratri would sit in the back of the mosque, in her hijab and a full-body prayer garment, preparing to pray among her transgender sisters. Most of them would line up ahead of her, their heads bare and their bodies clad in men’s shirts and pants.

The Pondok Pesantren Waria was likely the first transgender prayer school in the world. The school’s name is a combination of pondok pesantran, Indonesian for prayer school, and waria, Indonesian for transgender woman. Shinta and another transgender woman (waria in Indonesian), fostered a community of 30 to 40 active members, from a community of several hundred transgender women in the city. Then in February, it was shuttered by authorities responding to threats from the Islamic Jihad Front.

Shinta, 54, was also the mosque’s landlady, even letting some other waria live at her home, though her co-founder passed away a few years ago. They’d created the space in 2008 to provide the community with a gathering space and help in the aftermath of a devastating earthquake in Yogyakarta two years prior.

Shinta has been married to men, twice, and now lives with one of them and his new wife—a cisgender woman. She’s also raising an adopted daughter—a fact that might explain why she, unlike so many of the other waria, prays in her hijab as a woman. She is not only a waria: Shinta is a mother.

“I am a waria; I am not gay, and I am not straight,” Shinta told David Brian Esch, who spent three months observing the prayer school while he was a graduate student in religion. “I feel I am a woman, but physically I am a man.”

While transgender issues and identities are just now gaining widespread acceptance in the United States, they’ve been on the forefront of Indonesian national consciousness longer because the waria are more visible than gay, lesbian, and bisexual people.

The waria a term for transfeminine people drawn from the Indonesian words for woman (wanita) and man (pria), see themselves as far from gay.

“They would look at me—I’m a gay man—and they would say, ‘You’re a woman,’” Esch said. “Their sexuality is what gives them gender.”

Over conversations with 19 waria, Esch said he continuously got answers about sexuality to questions about gender.

“I would ask, are you gay or heterosexual, and they would say, no, I’m waria, I’m a woman,” he said. “What they’re most adamant about is that they’re not gay.”

Yet the waria nonetheless face rampant discrimination in housing, employment, and society at large, and the prayer school was a social and religious safe haven.

“One fascinating aspect of the pesantren is that it went along without any harassment from hardline groups for years and we all wondered why extremist groups were shutting down churches and ‘gayish’ nightclubs and leaving the pesantren alone,” Esch said. Perhaps Shinta’s integration in the general community of Yogyakarta, and the city’s large student base, may have given them more leeway.

“Yogyakarta is a city where all Islamic groups, both moderate and Islamist-leaning, have a high representation,” Alexander Arifianto, a researcher at Singapore’s Nanyang Technological University, told The Daily Beast, adding that the groups recruit from the city’s universities. “The attack against the LGBT boarding school is just the latest of these incidents within the city. Last year there were several attacks against a number of Christian churches within the city.”

Transgender people have been acknowledged throughout Islamic history, and the Prophet Muhammad’s wife is even said to have had a mukhannath (effeminate) servant who was only banished from the women’s quarters when the Prophet realized he was attracted to women.

Even today in Iran, the Islamic government will pay for gender confirmation surgery for transgender people, making the country second only to Thailand in the number of such surgeries performed. (Homosexuality is punishable by death in Iran, and activists worry that some gay people may be forced into such surgeries to escape that grisly end.)

The waria at the prayer school, however, are increasingly familiar with Western terms like gender identity and expression: Volunteers frequent the mosque and the local Planned Parenthood gives them workshops on those concepts. Now, the waria translate waria to transgender, but gender and sexuality are still culturally inextricably linked.

Indonesia, an archipelago-nation home to the world’s largest Muslim population, has no laws against sodomy and is one of the friendliest Muslim-majority countries for LGBT people. But the country also has a growing Islamist presence that is attacking the big-city safe havens for queer folks. Last month, for instance, the country banned LGBT emojis.

Just before the pesantren was forced to close, the Indonesian psychiatric association declared being transgender “may cause suffering and obstacles in functioning as a human being.”

But at the makeshift mosque, they had a safe haven and a clear understanding of their identities. Their religious leader told Esch that he wanted Islam to “adapt to the era and take into account gender, human rights, and a transgender perspective.”

This hope for an expansion of acceptable practices and opinions is the very thing conservative salafist preachers in the city find threatening.

“God created his creatures and I want to live as I am,” Oki, one of the waria at the pesantran, told Esch on camera. “It is my fate.”

“Sometimes I feel sad because I want to pray at the mosque, but people look and talk about me,” she added. “Others have told me that being waria is a sin. I told them that we do not know God’s gender. We do not know if God is a man or a woman or waria.”

Another waria, Tamara, asserted an almost-holy status for her gender when confronted with naysayers.

“I just asked, so, what gender your God? Your God is women or guys? And they answer, God not women and God not man,” she told Esch in English. “And I’m stand up and told them, I’m your God!”

And the pesantren allowed the women to pray as they want, although most chose to pray as men. They see themselves as male, not as men, Esch explained.

“I pray as a man because I want to face my god as a man. And I learned as a child to pray as a man, with the male dress, the sarong, and when I die I want to be buried as a man, even though I am waria,” Oki said. “I will be asked by God what my original family name is.”

Because this belief is prevalent, many waria say they don’t want gender confirmation surgery, though it would be financially unfeasible for most in any case.

The body modifications that do take place come from taking female hormones (usually birth control pills), and injecting liquid silicone into their faces to give them a more feminine look. It travels under their skin and settles on the ends of their noses and on their cheekbones, giving some of the waria a distinctive, mask-like appearance. Some resort to under-the-table surgeries to remove it.

While the pesantren waria attracted researchers and reporters from around the world by combining the seemingly incongruous categories of transgender and Muslim, that combination may have been the least interesting thing the waria observed about themselves. They would rather talk about the discrimination they encounter in housing and employment.

“What you’re asking us is not very important to us,” they told Esch.