(Getty)

Two Indonesian men arrested for having gay sex have been told their punishment should be 80 lashes in public.

The 20 and 23-year-old defendants reportedly appeared at the Shariah court last night without a lawyer, and heard the prosecution tell the judge they should receive 80 lashings with a cane.

The case in Banda Aceh City, in the state of Aceh, will resume next week, when the judge will announce his decision.

If sentenced to endure lashes, the defendants would become the first to undergo the punishment for gay sex in Aceh.

The law put into place in the region two years ago allows for up to 100 lashes for ‘morality offences’.

Gay sex is legal in the rest of Indonesia.

The men, who were identified in court by their initials – MT and MH – are from North Sumatra and Aceh respectively.

They were informed on by their neighbour, who took video footage.

The video shows one of the men naked and visibly distressed as he apparently calls for help on his cellphone, according to the Associated Press.

One of the defendants is seen being repeatedly pushed by another man who prevents the couple from leaving the room.

Speaking to reporters outside the courtroom, prosecutor Gulmaini said: “MH and MT are legally and convincingly proven to have conducted the [gay act].”

The father of one of the defendants, who requested anonymity, told Digital Journal that he was unaware that his son was not straight before he was arrested.

“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 anymore.”

Marzuki, head of the Aceh Provincial Sharia Law Department, said the men had “confessed” to being a gay couple.

Marzuki said residents in the local area had been suspicious of the men because they of their apparent intimacy, and deliberately set out to catch them having sex.

Indonesia is officially a secular country, but Aceh, where the two men live, practises Shariah law.

It is the only province in the Muslim-majority country to do so, having won this concession from the government as part of a 2005 autonomy deal.

The agreement was created to end a bloody decades-long conflict between Muslim separatists and the military in which thousands died.

While homosexuality has never been illegal in Indonesia, attitudes towards LGBT people have become steadily more extreme in recent years despite a growing gay population.

The Indonesian Psychiatrists Association classifies homosexuality, bisexuality and being transgender as illnesses.

Earlier this month, eight men were arrested for holding a “gay party” in Surabaya, the second biggest city in Indonesia.

The two alleged organisers of the event could face up to 15 years in prison.

And in January, petitioners argued in the country’s Constitutional Court that sex outside of marriage – such as LGBT sex – could turn Indonesia into an “uncivilised nation” and should be criminalised.

A gay couple from the country’s North Sulawesi province were arrested last year after they posted photos on Facebook showing them kissing in bed.

Also last year, it was announced that the country’s government would clamp down on gay culture – instituting a ban on online “gay propaganda” after a request from the police.

Communications ministry spokesman Noor Iza confirmed that apps including Grindr, Blued and BoyAhoy would be blocked in the country, claiming they were “promoting gay lifestyles”.

Last month, a study found that anti-LGBT discrimination could be costing Indonesia as much as $12 billion every year.