Indonesian police have detained 141 men including several foreigners for allegedly taking part in a gay sex party at a sauna, an official said Monday, the latest sign of a backlash against homosexuals in the Muslim-majority country.

Officers late Sunday raided a building in the capital Jakarta that houses a sauna and a gym, and halted what they said was a sex party promoted as "The Wild One".

Pictures circulating online showed topless men sitting crammed in a room next to gym equipment after the raid. Police said four foreigners were among those arrested -- one Briton, one Singaporean and two Malaysians.

"Our officers did an undercover investigation and raided the place on Sunday," senior detective Nasriadi, who like many Indonesians goes by one name, told AFP.

Homosexuality and gay sex are legal everywhere in Indonesia except in conservative Aceh province, but Nasriadi said that 10 of those arrested in the Jakarta raid could be charged under the country's tough anti-pornography laws.

The raid is further evidence of growing hostility towards Indonesia's small lesbian, gay, bisexual and transgender (LGBT) community. Since last year, ministers, hardliners and influential Islamic groups have been lining up to publicly denounce homosexuality.

- Growing backlash -

Those who face being charged include the alleged organisers of the event as well as men suspected of being prostitutes and striptease dancers. Those found guilty of breaking the laws face up to 10 years in jail.

The other detained men are still being questioned by police as potential witnesses in the case.

Nasriadi said people attending the event had to pay an entry fee, which included admission to a striptease show on one floor of the building, and that the main "sex party" took place on another floor which was dimly lit.

Some of the detainees were Monday paraded in front of the media at a press conference wearing black masks, while a coalition of legal aid groups condemned the arrests and the mens' treatment.

Story continues

The coalition, which is representing the men, accused police of refusing to let those arrested get dressed before transferring them to a police station and during subsequent questioning.

They also accused the police of taking naked pictures of the men and spreading them on social media, adding: "These arrests are a bad precedent for other gender and sexual minorities."

But Nasriadi denied that police had taken pictures of the arrested men, insisting: "We work professionally."

The backlash against the homosexual community began in early 2016, and activists believe it was triggered by widespread media coverage of a decision in the United States to legalise same-sex marriage.

Recent examples include a raid earlier this month on a suspected gay sex party in the city of Surabaya. Eight men were named suspects following the raid and face being charged with the anti-porn laws.

And last week an Islamic court in Aceh sentenced two men to be publicly caned for having gay sex, the first time such a punishment has been handed down for homosexual activities in the conservative province.