Indonesia’s LGBTI community could be forgiven for thinking their search for equality is going backwards. During the pre-Islamic, Hindu-Buddhist period of Indonesian history, waria (third gender people) were not only accepted – they were respected and revered. Now, they are more likely to be hounded out of town, as Yulianus Rettoblaut – better known as Mama Yuli – can attest.

She runs a shelter in the Indonesian capital of Jakarta that has helped more than 4,500 transgender and gay people fleeing persecution and threats.

“These people don’t have any legal protection, their parents reject them because they have become waria and the parents are embarrassed by them. The parents force their children into being sons, into being boys, because they are unhappy having a waria child,” she says. “The boys are uncomfortable and leave home, without having any identity, without having any education. So therefore when they turn up in big cities like Jakarta, they have difficulties finding food and somewhere to stay. A lot become beggars.”

Most face discrimination in the name of religion, says Rettoblaut. “Eighty per cent of waria who end up on the streets come under religious pressure and strong stigmatisation, because the state isn’t providing enough protection and support for them. This is what causes public violence against waria, or torture, or shaming.”

Dependent visa case gives Hong Kong’s gay community reason to hope

In contrast to India, where judges last week legalised same-sex relations, the LGBTI (lesbian, gay, bisexual, transgender and intersex) community in Indonesia – the world’s most populous Muslim-majority nation – increasingly faces public hostility, violence and legal persecution, against a backdrop of rising religious conservatism and homophobic political discourse.

Although Indonesian law does not directly criminalise homosexuality, last year police conducted regular raids on bars, spas and homes suspected of hosting “gay sex parties”, arresting those found inside for “pornography” or “public indecency”. Meanwhile, the Indonesian parliament recently tried to outlaw same-sex relations completely. In the conservative province of Aceh, North Sumatra, being gay is already a crime under locally applied sharia law, punishable by a public caning. Similarly, transgender individuals have been arrested to great police fanfare, had their long hair shaved and been goaded to behave like “real men”.

Aceh’s religious zeal may seem extreme, but some Islamic clerics see it as something to aspire to, while broad intolerance towards sexual minorities is reflected in public opinion across Indonesia.

A survey this year found 87 per cent of Indonesians who understood the term LGBTI considered the community a “threat to private or public life”, while a similar proportion thought LGBTI individuals should not hold senior public office.

Nearly 1,000 Indonesians suffered discrimination, stigmatisation and violence for expressing their sexual orientation or gender identity last year, according to the Indonesian Community Legal Aid Institute (LBH Masyarakat) – and those were only the cases that received media coverage. Among these, about 70 per cent involved transgender women.

Pink Dot: Singapore’s rare gem for LGBT community shines brighter

The climate of intolerance has been fuelled by the Islamic clerics of the Indonesian Ulama Council, who issued a fatwa in 2015 calling the LGBTI community an “affront to the dignity of Indonesia” and referring to homosexuality as a “curable disease”.

Since then, while other countries across the world have legalised same-sex marriage or recognised gay rights, Indonesian politicians seeking Muslim votes have invoked “LGBTI” as a threat to traditional family values.

Hendri Yulius, an author and researcher on gender and sexuality, says anti-LGBTI statements by politicians have increased since the United States Supreme Court ruled to allow same-sex marriage in 2015.

“The inflammatory statements began in early 2016 and conflated LGBTI rights with same-sex marriage. Since then, politicians have been using the issue for their own ends,” he says. “The heterosexual family is perceived as a foundation stone of society in Indonesia so once there are perceived attacks on family values it is very easy to generate a reaction of moral panic.

“The question is, where is the state in this? President [Joko Widodo] said last year there would be protection of minorities but in practice since then we have seen the raids on gay saunas and bars.

“In Depok and Surabaya the authorities formed anti-LGBTI task forces but what are they doing now? It’s very difficult to pin down the state’s perspective.”

This year, the Indonesian parliament tabled controversial reforms to the criminal code that sought to criminalise sex outside marriage – gay or straight – by defining crimes of adultery.

Activists and human rights groups were relieved when Widodo failed to sign the proposals into law last month, but are braced for a renewed campaign to criminalise LGBTI activities when a new parliament convenes after elections next April.

Meanwhile, police chiefs continue to act on their own initiative, arresting more than 300 people for LGBTI-related activities last year. Kyle Knight, LGBTI Programme Researcher for Human Rights Watch, has called on the government to “halt these arbitrary and unlawful raids and arrests”. He says the government “should declare unequivocal support for the LGBTI community’s rights to privacy and freedom of association”.

Is Widodo just paying pre-election lip service to human rights?

Hera Diani, the managing editor of Magdalene, an online magazine covering gender issues, is pessimistic about the prospects for sexual minorities winning acceptance. “Most people are against LGBTI rights, unfortunately,” she says. “Before the rising religious conservatism, gay bashing in public was rare … but persecution against LGBTI people has been increasing, especially in the last two years. Politicians are opportunistic, they ride on the hatred and they’re too afraid to speak out against the Islamists.

“My gay friends are now terrified, on the edge of their seats. The more privileged ones are ready to escape to other countries should the situation get worse.”