As a bisexual Muslim in Malaysia, where Islamic laws prohibit homosexuality and secular law bans sodomy, Amirah could be forgiven any pangs of envy she felt when the Indian Supreme Court this month decriminalised gay sex.

Barely could the celebrations of the LGBTI (lesbian, gay, bisexual, transgender, intersex) community in India have contrasted more to the atmosphere in Malaysia, where just three days earlier two women had been publicly caned in the state of Terengganu after admitting same-sex relations.

“I was so overjoyed that outdated, oppressive laws were being overturned in India. But at the same time I couldn’t help but envy them, as I don’t see this ever happening in Malaysia,” she recalled.

Instead Amirah – not her real name – and her partner live in constant fear.

“My girlfriend and I are always worried we are going to be reported to the Islamic authorities and face some sort of punishment. I used to just be scared of getting shipped off to a conversion therapy workshop, but after the caning received such widespread media attention people here have become even more vocal about their hatred of us and I am now scared of violence.”

Her fear is not unwarranted. In 2017, transgender woman Sameera Krishnan was stabbed and shot to death. And just last month, another transgender woman was beaten so badly that her spleen ruptured.

In Malaysia, discrimination against the LGBTI community is rampant, partly due to colonial-era laws punishing sodomy, “gross indecency” between men and anything that offends religious sensitivities, but also Islamic laws that prohibit cross-dressing.

Non-governmental organisations and advocacy groups say transgender people are frequent targets of physical and sexual assaults – and of police extortion.

Not only is gay marriage not allowed, active discrimination occurs at a policy level. Recently, the Islamic Affairs Minister Mujahid Yusof Rawa demanded the removal of the portraits of two LGBTI activists from an art exhibition.

Indeed, anti-LGBTI attitudes often verge on the ridiculous, with national censors attempting to ban Disney’s Beauty and the Beast due to a “gay scene”.

In scores of former British colonies, sex acts deemed “unnatural” are criminalised under Section 377 of the penal code. The law was first introduced by British colonial authorities into the Indian penal code, and the same section number is used in former colonies such as Malaysia, Singapore, Pakistan, and Jamaica.

Beauty and the Beast gay scene backlash from Singapore to Malaysia

The most high-profile use of Section 377A, Malaysia’s law against sodomy, was when democracy icon Anwar Ibrahim – now the prime minister-in-waiting – was charged with the offence in 1998, a matter he contends was confected by his rivals to end his political career.

Anwar, who was granted a royal pardon after Pakatan Harapan’s shock election win in May, condemned the caning of the two women, saying it was an example of “going to the very extreme just to prove you are Islamic”.

And even Prime Minister Mahathir Mohamad has weighed in, saying the public caning did not reflect the Islamic values of justice or mercy.

“When we start something, we start it with ‘Bismillahirrahmanirrahim’, in the name of Allah, the most Gracious and Merciful, but then we act as if in Islam there is no generosity at all,” he said.

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

The Pakatan Harapan government has claimed it cannot do anything about these Islamic punishments, as sharia law is a state matter. However, constitutional law expert Honey Tan disagrees.

“Parliament can amend the Sharia Courts [Criminal Jurisdiction] Act. The act should be amended to remove whipping as a possible punishment,” she said.

Malaysian gender equality advocacy group JAG has called on the attorney general to review all state sharia and criminal enactments, ensure they are constitutional, and repeal them if not.

Meanwhile, across the causeway, Singapore faces a similar dilemma.

Retired diplomat and lawyer Tommy Koh has urged the Singaporean LGBTI community to bring a class-action suit against the government to challenge the constitutionality of Section 377A. But law and home affairs minister Kasiviswanathan Shanmugam thinks the country is too “deeply split” on the matter. “The majority oppose any change to section 377A – they are opposed to removing it. A growing minority want it to be repealed. The government is in the middle,” he said.

An online survey carried out by market research firm Ipsos found 55 per cent of 750 Singaporeans supported the law banning gay sex. Twelve per cent were against it, while 33 per cent were neutral.

Shanmugam contests that, even with the law in place, nobody in Singapore has been prosecuted for being gay.

But LGBTI rights activist Jean Chong said this was a “silly” position. “If you keep the law but say you won’t use it, you are telling the attorney general it can’t be used, that’s an awkward situation to be in. We can argue from a human rights perspective, but even from a legal perspective it is silly to keep a law that can’t be used. But I am happy that elite figures [like Tommy Koh] are saying that the law must go,” she said, adding that while she believed repealing 377A “could happen” for Singapore, it would not be any time soon.

The Singaporean government had previously made public statements to the effect that Section 377A would not be proactively enforced. However, the decision whether to prosecute an individual under Section 377A remains with the attorney general, who is independent of the government in matters of prosecutorial discretion.

“That being said, the government’s stance on ‘non-proactive enforcement’ of Section 377A is a matter which the attorney general can legitimately consider in exercising his discretion whether to prosecute an offence under Section 377A,” said lawyers Suang Wijaya and Eugene Thuraisingam in a joint statement. The duo are representing Singapore DJ Johnson Ong Ming (better known as DJ Big Kid), who filed a court challenge of 377A just days after the India ruling.

“The lack of ‘proactive enforcement’ of Section 377A is one reason why we will argue that Section 377A simply does not bear a rational relation to any social purpose. This is also a potential ground for striking down the statute as unconstitutional.”

Chong believes the government’s reluctance to repeal the law is “all about votes”.

In Mahathir’s Malaysia, no gay rights and no free speech

University Malaya’s senior lecturer in gender studies Alicia Izharuddin said conservative attitudes prevailed in both Singapore and Malaysia. “There is a lack of understanding, a refusal to understand and accept diversity, and hence fear and shame of homosexuality. It is an emotional response as much as it is supposed to be rational that non-normative gender and sexual identities will threaten the social fabric, but there is of course no proof of that and there never will be.”

Alicia said India, despite being plagued by inequality, was a beacon of hope. “It has proven that progressive legal landmarks do not just happen in Western societies but in so-called developing countries, too.”

While India celebrates the repeal of a colonial legal remnant, Singapore and Malaysia have a long way to go. But activists in both countries are optimistic.

“I am happy to be living in a time where we are seeing positive changes and the dismantling of discriminatory policies and laws against LGBTI people. We don’t need to be corrected or rehabilitated, and discrimination and violence against LGBTI now more than ever is not acceptable,” said Thilaga Sulathireh of transgender rights group Justice for Sisters.

“As much as things in Malaysia are challenging, we can overcome this. We should continue to imagine and work towards a Malaysia and world that is inclusive of all persons, including LGBTI persons.”