Video footage has emerged of Indonesian vigilantes physically assaulting two young gay men in the conservative province of Aceh. The recording shows the pair being slapped, kicked and insulted after they were detained for breaching strict religious laws.

Residents caught the two men – aged 21 and 23 – having sex in a rented room in Banda Aceh, the provincial capital, on 28 March. They were turned over to religious police the following day – but only after being subjected to a "frightening and humiliating" ordeal due to their sexual orientation, Human Rights Watch (HRW) noted.

On Monday (10 April), the head of investigations with Aceh's religious police, Marzuki Ali, told Reuters: "The case has been sent to the Sharia court of Aceh... It involves sodomy which can be punished by 100 lashes."

He added that the pair were detained by neighbours after they grew suspicious of them. "Because of the suspicion, at around 11:00pm the locals raid the house, and they caught them having anal sex, through the 'back door'," said Ali.

Disturbing footage of the raid was captured on a mobile phone. One man wearing blue shorts can be seen being pushed away from the door by what appears to be a guard.

Another man can be seen slumped on the floor naked as he speaks on the phone. "Brother, please help, please help, please help us," he was quoted as saying by "Brother we got busted having sex. Brother please don't report me."

As he pleaded with the person on the other end of the call, the victims were kicked and slapped and abuse was hurled at them.

HRW has condemned the detention of the two men as well as the prospect of 100 lashes in public – "a punishment that constitutes torture under international law."

"The arrest and detention of these two men underscores the abuse imbedded in Aceh's discriminatory, anti-LGBT ordinances," said Phelim Kine, deputy Asia division director at Human Right Watch.

"These men had their privacy invaded in a frightening and humiliating manner and now face public torture for the 'crime' of their alleged sexual orientation."

The rights group added that Aceh's LGBT community is particularly vulnerable to the province's 2014 criminal code which bans sodomy and lesbian sexual action. Out of 34 provinces, Aceh is the only one that can legally adopt bylaws derived from Sharia.

The country's president, Joko "Jokowi" Widodo, finally spoke out in defence of the LGBT population in October by calling for their protection and an end to discrimination, HRW said he has "not backed up that statement with action."

"President Jokowi should urgently intervene in this case to demonstrate his stated commitment to ending discrimination against LGBT people," Kine said. "Jokowi then needs to act to eliminate Aceh's discriminatory ordinances so these outrageous arrests don't happen again."

Last year, 339 people were caned in the province under Sharia punishment.