Two young men are likely to be Indonesia’s first gay couple to face trial for breaching religious laws.

Video shows the men, aged 20 and 23, held in custody by Indonesian vigilantes who allegedly kick, slap and insult the pair before they’re turned over to the province’s religious police.

The duo could face trial for breaking religious laws after neighbours allegedly walked in on them together.

They will be caned if convicted, with a maximum penalty of 100 strokes.

It’s understood neighbours grew suspicious of the duo’s relationship and took it upon themselves to investigate.

View photos The man appears distressed on the phone More

Banda Aceh's head of investigations for the Sharia Police, Marzuki Ali, said the people who detained the pair on March 28 were neighbours of the men who were suspicious of the couple.

The mobile footage shows a naked man on the floor making a phone call.

“Brother, please help, please help, please help us,” he says on the phone.

Another man is seen in the background getting pushed back from the doorway in a rough manner while the man on the floor is slapped and kicked.

View photos The man is prohibited from leaving. More

“Brother we got busted having sex,” the man on the floor says on the phone.

The neighbours are also heard calling one of the men “a dog” – a particularly offensive insult to any Muslim.

Banda Aceh's religious police enforce the province's strict sharia code.

Andreas Harsono, from the group Human Rights Watch, said the code against gay sex was passed in 2014, but until now authorities had not had enough evidence to charge anyone.

View photos 339 people were caned in Aceh last year. Photo: EPA More

A total of 339 people were flogged in Aceh last year for so-called moral offences like gambling, drinking, or spending time in private with a member of the opposite sex.