Two gay men have been sentenced to 85 lashes each after vigilantes filmed them in bed together in Indonesia.

The two men, aged 20 and 23, were found guilty of breaking sharia law in the conservative province of Aceh, the only part of the Muslim-majority country that implements strict Islamic regulations.

Caning is a common punishment for gambling and drinking in Aceh but the latest verdict is the first time it has been handed down for gay sex since a sharia regulation banned the practice in 2015.

The men were caught together in bed in March by thugs who burst into the boarding house where they were staying, in provincial capital Banda Aceh.

The two men, aged 20 and 23, were found guilty of breaking sharia law in the conservative province of Aceh after they were caught in bed together

Both men, who were filmed in bed together by a vigilante group, Two gay men have been sentenced to 85 lashes each after vigilantes filmed them in bed together in Indonesia

Shaky mobile footage showed the men together in a hostel in the provincial capital Banda Aceh. The thugs who filmed the men beat and taunted them

Shaky mobile footage of the raid showed the vigilantes kicking, slapping and insulting the men, one of whom was slumped naked on the ground during the attack.

Police later arrested the distressed couple, who said they were in a relationship and had had sex three times.

Handing down the verdict at the Banda Aceh court, presiding judge Khairil Jamal said the men had been 'proven legally and convincingly guilty of committing gay sex, the defendants are sentenced to 85 strokes of the cane in public'.

The sentence was higher than the 80 lashes recommended by prosecutors. Officials have not revealed the men's names because of the sensitivity of the case.

The men arrived at court handcuffed to one another, covering their faces with cloths to hide their identities from journalists. During the hearing, they bowed their heads and covered their faces with their hands.

Asked by the judge if he accepted the verdict, one of the men said softly: 'Please reduce my sentence'. The second nodded gently and did not say anything.

The father of one of the defendants, who requested anonymity, said he did not know his son was gay before he was caught.

Police later arrested the distressed couple, who said they were in a relationship and had had sex three times

Handing down the verdict at the Banda Aceh court, presiding judge Khairil Jamal said the men had been 'proven legally and convincingly guilty of committing gay sex'

Asked by the judge if he accepted the verdict, one of the men said softly: 'Please reduce my sentence'

The sentence handed down to the gay men was higher than the 80 lashes recommended by prosecutors

The men arrived at court handcuffed to one another, covering their faces with cloths to hide their identities from journalists

'This is an ordeal for our family,' he said. 'After this problem is resolved, we will send him to an Islamic boarding school to be educated so he won't be deviant any more.'

Horrifying footage shows one of the distressed men, who was completely naked, speaking to his family on a phone, while telling one of the vigilantes: 'Please brother, please stop.'

They were beaten and then taken to Wilayatul Hisbah, a Sharia police facility, after their arrest on March 28.

A sentence recommendation is a usual step in an Indonesian court case and is typically followed soon afterwards by a verdict. Judges do not have to follow the recommendation but often do.

Aceh is the only province in the world's most populous Muslim-majority country which implements Sharia law.

The region has since 2001 been allowed by the Indonesian government to adopt bylaws which criminalise homosexuality as well as punishing women who do not cover their bodies.

People caught gambling and drinking alcohol have for some years been punished with public canings.

The father of one of the defendants, who requested anonymity, said he did not know his son was gay before he was caught

Under a local law that came into force in 2015, people can also be punished for having gay sex with up to 100 strokes of the cane.

Gay sex is not illegal in the rest of Indonesia, which mainly follows a criminal code inherited from former colonial ruler the Netherlands.

Authorities in the province on the northern tip of Sumatra island caned 339 people in 2016 for a range of crimes, according to HRW.

The Indonesian government has yet to respond to a letter from the United Nations, written in April last year, expressing concerns about the abuse of LGBT people in Aceh.

Last October, president Joko 'Jokowi' Widodo said police must defend the country's LGBT population, but Human Rights Watch has accused him of inaction since.