/ Updated  / Source: Reuters

JAKARTA — Indonesian police have detained 141 men in a raid on what authorities described as a gay prostitution ring run from a club in the north of Jakarta, a police spokesman said on Monday.

Police spokesman Argo Yuwono said in a statement those detained had "violated pornography laws."

Police officers escort men arrested in a raid on a gay sauna at North Jakarta police headquarters in Jakarta, Indonesia, Monday, May 22, 2017.Tatan Syuflana / AP

He said 10 suspects, including the owner of the club and several staff members, had been charged, while the others were being questioned.

Sunday night's raid came amid concerns over a backlash against the lesbian, gay, bisexual and transgender community in the world's largest Muslim-majority country.

Rights activists condemned the raid as a violation of privacy.

"These detentions set a bad precedent for gender and sexual minorities," Legal Aid Jakarta, a coalition of lawyers and activists, said in a statement.

The group said the men were humiliated by police and many were strip-searched, photographed and marched naked from the venue into police vehicles. Photos were then shared on social media, the group added.

Men arrested in a recent raid stand in line during a press conference at a police station in Jakarta on May 22, 2017.Fernando / AFP - Getty Images

The detentions follow a similar raid earlier this month in Indonesia's second-largest city of Surabaya, where officials published the results of HIV tests of several men suspected of gay sex, media said.

Homosexuality is not illegal under Indonesian law, but the LGBTQ community has come under pressure since government officials expressed reservations last year about activism by its members.

Two men were sentenced to public caning last week in the ultra-conservative province of Aceh on the northern tip of Sumatra island after being convicted of engaging in gay sex. It was the first such ruling since anti-homosexuality laws were introduced in the province in 2014.

Related: Indonesian University Tries to Weed Out LGBTQ Applicants

Aceh is the only Indonesian province that criminalizes same-sex relations and that uses Islamic law as its legal code in addition to the national criminal code.

Indonesia has strict anti-pornography laws under which offenders can face up to 15 years' jail. The maximum penalty for downloading pornographic material is four years in jail or a two billion rupiah ($150,350) fine.

Follow NBC Out on Twitter, Facebook and Instagram