Police in Indonesia's most populous province plan to deploy a taskforce to investigate lesbian, gay, bisexual and transgender (LGBT) activity, a move likely to fuel concerns of a widening crackdown on the community in the Muslim-majority country.

West Java police chief Anton Charliyan disclosed the plan on Tuesday as two gay men in the province of Aceh were publicly flogged, and days after police raided a gay club in Jakarta and distributed photos of suspects to the media.

With the exception of Aceh, homosexuality is legal in Indonesia. Activists say, however, that police targeting of consensual gay sex has shone a light on discrimination and harassment in the world's third-largest democracy.

Indonesia's reputation for tolerance is already under scrutiny after Jakarta Governor Basuki Tjahaja Purnama, a Christian, was sentenced this month to two years in prison for blasphemy.

Responding to Sunday's Jakarta raid, Charliyan told reporters in Bandung, the capital of West Java, a province with a population of about 47 million, that LGBT people suffered a “disease of the body and soul”.

He called on the public to report their activities.

“I hope there are no followers in West Java, no gay or LGBT lifestyle or tradition, Charliyan said. ”If there's anyone following it, they will face the law and heavy social sanctions. They will not be accepted in society.“

A leading LGBT activist slammed his remarks, which were confirmed in a recording provided to Reuters by journalists present when Charliyan spoke on Tuesday.

“Police have a mandate to follow the law. They are not the morals police,” said Yuli Rustinawati, chairperson of Arus Pelangi, an Indonesian LGBT activist organisation.

In remarks on Wednesday, Charliyan said the police “taskforce” would include intelligence specialists and was particularly concerned with disrupting “secret parties”, the Detik news portal reported.

A national spokesman for the police, Setyo Wasisto, said the approach in West Java did not reflect a national strategy.

“It is enough for us to handle it as we do regularly,” he said.

​Charliyan's comments follow a spate of high-profile police actions against gay clubs and parties just as the country's Constitutional Court is due to rule on a petition to outlaw homosexuality and adultery.

On Sunday, police detained 141 men and released photos of some of them in varying states of undress to the media, revealing many of their identities. Only 10 of the men have been declared suspects, five remain under investigation and 126 were released.

The police said the photos were released due to “procedural errors”, the Jakarta Post reported.

Rustinawati at Arus Pelangi said, however, the release of the images was part of a police pattern of publicly shaming of gay people.

The two Acehnese men, caned 82 times each on Tuesday, were punished in front of a crowd of more than 1,000. Semi-autonomous Aceh province is governed by Sharia Islamic law.

Earlier, a video of the men, naked and distressed as they were apprehended by Sharia police, was released and viewed widely on social media.

In Indonesia's second-largest city of Surabaya in East Java, 14 gay men were arrested, tested for HIV and the results made public, Indonesian media reported.

“The police also release data - names and addresses,” said Rustinawati. “It's humiliating and it puts LGBT people in danger.”

On Tuesday, North Jakarta police chief Dwiyono, who like many Indonesians has only one name, took journalists through the gay club raided on Sunday. As they climbed three floors, he pointed out a gym, a communal jacuzzi used for “striptease” and a cluster of cubicles for sex.

“This door can only be opened if you pay 185,000 rupiah ($14) to the receptionist,” he said. “In here, there's no change room, you just tear off your clothes and use a towel.”

Indonesian President Joko Widodo last year gave qualified support for the gay community, telling the BBC that “there should be no discrimination against anyone”, before noting that homosexuality is not popular in his country.

LGBT+ rights around the globe Show all 9 1 /9 LGBT+ rights around the globe LGBT+ rights around the globe Russia Russia’s antipathy towards homosexuality has been well established following the efforts of human rights campaigners. However, while it is legal to be homosexual, LGBT couples are offered no protections from discrimination. They are also actively discriminated against by a 2013 law criminalising LGBT “propaganda” allowing the arrest of numerous Russian LGBT activists. AFP/Getty LGBT+ rights around the globe Brunei Brunei recently introduced a law to make sodomy punishable by stoning to death. It was already illegal and punishable by up to 10 years in prison AFP/Getty LGBT+ rights around the globe Mauritania Men who are found having sex with other men face stoning, while lesbians can be imprisoned, under Sharia law. However, the state has reportedly not executed anyone for this ‘crime’ since 1987 Alamy LGBT+ rights around the globe Sudan Both male and female same-sex sexual activity is illegal under Sudanese law. Men can be executed on their third offence, women on their fourth Getty LGBT+ rights around the globe Saudi Arabia Homosexuality and gender realignment is illegal and punishable by death, imprisonment, whipping and chemical castration Getty LGBT+ rights around the globe Yemen The official position within the country is that there are no gays. LGBT inviduals, if discovered by the government, are likely to face intense pressure. Punishments range from flogging to the death penalty Getty LGBT+ rights around the globe Nigeria Both male and female same-sex sexual activity is illegal and in some northern states punishable with death by stoning. This is not a policy enacted across the entire country, although there is a prevalent anti-LGBT agenda pushed by the government. In 2007 a Pew survey established that 97% of the population felt that homosexuality should not be accepted. It is punishable by 14 years in prison Reuters LGBT+ rights around the globe Somalia Homosexuality was established as a crime in 1888 and under new Somali Penal Code established in 1973 homosexual sex can be punishable by three years in prison. A person can be put to death for being a homosexual Reuters LGBT+ rights around the globe Iraq Although same-sex relationships have been decriminalised, much of the population still suffer from intense discrimination. Additionally, in some of the country over-run by the extremist organisation Isis, LGBT individuals can face death by stoning Getty

However, his defence minister, Ryamizard Ryacudu, suggested that homosexuality was a national security threat and part of a “proxy war” waged against Indonesia by foreign states.

A Pew Research Center poll in 2013 found 93 percent of respondents in Indonesia disagreed that “society should accept homosexuality”.

Indonesia's Islamist groups have long called for the criminalisation of gay sex. The Islamic Defenders Front (FPI), the vigilante group that led huge rallies against the now-convicted Jakarta governor, has cooperated with police in curbing alleged vice for more than a decade.