Being lesbian, gay, bisexual trans or intersex (LGBTI) is legal in Indonesia, and the country's rights movement has been strengthening steadily for the past decade or so. What, then, has sparked a crackdown in recent months that experts fear could result in national anti-gay laws?

Anti-LGBT sentiment swelled up in 2016, and bled into 2017. In May this year, police stormed the Atlantis gay club in Jakarta, detaining around 140 men for questioning. Five months later, local police officers raided a gay sauna and gym in the capital, arresting 58 people.

The clampdown is shocking to activists on the ground, according to Grace Poore, a researcher for OutRight International – an LGBTI advocacy group that has been working in the country for many years. By criminalising consensual sexual activity, authorities have contravened international human rights laws and standards it previously upheld, prompting the UN Human Rights Committee and other bodies to urge them to stop.

Currently Aceh, the semi-autonomous province of on the northwest of Sumatra Island, is the only part of Indonesia to outlaw homosexuality, after it was given the power to introduce stricter Islamic rules over a decade ago. Activists now fear that this may spread to a national level.

"This level of virulence on a national level is unusual for Indonesia," Poore tells IBTimes UK of the Muslim-majority country. "It has come out of nowhere, as Indonesia doesn't have the same kind of anti-gay laws in the region like those that Malaysia, Singapore, and Brunei inherited from the British," she explains.

There is no set pattern for how suspected LGBTI people are targeted or treated by officials, Laurie Hanna, the media manager for the human rights charity Amnesty International tells IBTimes UK,however she believes it is likely they use gay dating apps.

"In one case we found that two gay men were reportedly beaten, kicked and verbally abused by neighbours and then were arbitrarily detained by the police in Aceh province in January 2007, and taken to another police post, where they were subjected to further sexual abuse and other forms of torture and ill-treatment," she says, suggesting there are concerns that such tactics will become more widespread.

"After the reform era – which started in May 1998 – many civil society organisations, including the LGBTI people used the open civic space to express publicly their sexual identities and their rights," says Hanna. This sparked the growth of organisations which held public events for LGBT people, and used the internet to campaign and advocate for rights and raise awareness of health issues. This includes APCOM, founded by prominent campaigner Dédé Oetomo a decade ago.

But that began to unravel last year. In early 2016, the Minister of Research, Technology and Higher Education issued a statement labelling LGBTI people as a corruption of Indonesian social norms and values, and criticised the Support Group and Resource Centre on Gender and Sexuality Studies at the University of Indonesia for its research and public outreach program, threatening to ban any such activity at other institutions.

That year, the Indonesian Broadcasting Commission (KPI) issued a statement urging TV and radio stations to outlaw pro-LGBT programming to "prevent children from learning indecent behaviour". And in February, an Islamic boarding hose for transgender people in Yogyakarta was closed down for "security reasons".

Man caned for allegedly being gay Indonesia
An image taken in May 2017 shows one of two Indonesian men publicly caned in Aceh, for having sex - in a first for the Muslim-majority country where there are concerns over mounting hostility towards the small gay community. CHAIDEER MAHYUDDIN/AFP/Getty Images

The catalyst of the current clampdown is unclear. However a combination of a 2008 anti-porn laws describing homosexuality as a form of deviance for the first time, and the trickle of influence of ultra-conservative Wahhabi Islam from Saudi Arabia into the archipelago's many local governments appears to have created an anti-LGBTI powderkeg, says Poore.

"In the last two mass arrests in Jakarta this year, the main actor was the local police forces. Before that, harassment, intimidation and attacks against the LGBTI people, who organised both public and internal events, were committed by hard-line Islamist organisations," explains Hanna. "Meanwhile in Aceh province, it is the Aceh Shari'a police whose mandate is to enforce the Aceh Criminal Code."

"There is an attempt to make [homosexuality] a crime," warns Hanna. "There is an ongoing judicial review process under the Constitutional Court to make homosexuality as a criminal offence and also there is a draft law of the Criminal Code revision that proposes homosexuality as a crime."

Yet, a glimmer of hope remains as the highest levels of the Indonesian government have intermittently supported the LGBT community in the past. The Indonesian Attorney General in September rescinded a job advert which barred LGBT people from applying by claiming they are mentally ill. And in 2016, President Joko Widodo publicly stated that citizens should not be discriminated against, and that the police should protect those who identify as LGBT from violence.

"The people of Indonesia practice Islam in a culturally fluid way, because it is very diverse country," says Poore, adding that the increasingly restrictive interpretations of the religion are "not local or homegrown."

"Passing an anti-LGBT law would put Indonesia back years and years and years," she says, adding: "I hope that the good progressive voices will prevail and that the president himself will speak up and show that he recognises LGBT people as human beings."