Nearly two-dozen men are facing a second full day in police detention after police raided an underwear party in North Jakarta.

The detentions are reminiscent of a nationwide dragnet last year that left more than 300 gay men and transgendered women here behind bars last year, most because they suspected of violating the country’s opaque anti pornography laws.

But in a sign that officials are sensitive in international criticism, police argue the men are being prosecuted under the countrys drug laws. So far, four have been charged with possession of ecstasy while the remainder of the 23, who were rounded up, tested positive for the drug.

That police responded solely on worries of drug use seems far-fetched.

At the press conference police told media they were responding to neighbourhood complaints of large numbers of men were congregating at the private residence. 

Central Jakarta Deputy Police Chief AKBP Arie Adrian told reporters neighbours were worried the men had "deviant behavior"

"When they were arrested they were all shirtless and wearing only their underwear," Mr Arie is quoted as saying in local media.

The men, mostly young moneyed professionals, were thought to organize, what amounts to pop-up house parties or overseas trips through social media such as Facebook, police told reporters.

For their part, local media emphasized the suspects were gay. A headline in The Java Post read: "Dozens of Gay Men Arrested in Drug Party"

Human Rights Watch said the arrests had less to do with drugs than they did with gay bashing. Media reports said that police found 27 tablets on the premises.

"It is not surprising that they found drugs, but the police comments in the media suggest they were not looking for drugs —but rather gays," a Human Rights Watch activist said.

By emphasizing their investigation into the group's alleged social media links police may also be attempting to draw parallels between gays organizing online and Islamic radicals.

"In the past, police have conducted these raids because they see an announcement of a gay party on Facebook or (a gathering of) militant Islamist group, which tips them off," the activist said.

Activists say that the men had been detained since the early hours Sunday, though some had since been released. None have had access to activists or lawyers since their arrest.

In February, UN High Commissioner for Human Rights Zeid Ra'ad al Hussein said he called on the Indonesia's president, Joko Widodo, to end his country's open hostility toward its lesbian, gay and bisexual and transgendered citizens.