After a single-day trial, prosecutors in Indonesia's Aceh province have demanded two young gay men be punished with 80 strokes of the cane.

They are due to be sentenced next week and will become the first people in Indonesia to be punished by the courts specifically for homosexuality.

The pair, named as MT and MH, aged 20 and 23, pleaded guilty before a sharia court in Banda Aceh on Wednesday.

The short trial was held before the Banda Aceh Sharia District Court in a closed hearing but the ABC has obtained the prosecution documents submitted to the three-judge panel.

"The deeds of the defendants creates a bad image of the Aceh people and community," the documents stated.

The men have been in custody since early April, when a group of neighbourhood vigilantes broke down the door of the home of one of the men and allegedly caught them in bed together.

Sorry, this video has expired Indonesian vigilantes detain, punch and kick two men they accuse of being gay

The vigilantes filmed themselves kicking, slapping and insulting the pair with taunts like "you are a man — why do you look like this?"

In the video, the young men plead with their accusers not to report them to the sharia police.

The video was not part of the evidence presented to the judges. The evidence presented to the court included the mens' clothing and three condoms.

First couple facing homosexuality laws

They are the first couple to face trial for breaching Aceh's sharia laws on homosexuality, which also outlaw other so-called moral offences such as gambling and drinking.

Aceh was granted autonomy to introduce sharia law under a peace deal with the Indonesian Government to end civil war in the province.

Unmarried heterosexual couples are regularly prosecuted and caned for offences such as being alone in the same room with each other.

Last year the ABC witnessed an 18-year-old woman who received nine strokes after she was caught alone in a room with her boyfriend.

The two Aceh men face a maximum punishment of 100 strokes of the cane, but the prosecution said they should receive 80 strokes because they were young and had admitted their guilt.

More than 300 people were caned in Aceh last year for so-called moral offences. ( AP: Heri Juanda )

The prosecution documents state: "The defendants have never been convicted before, and they are still at a young age so they have the chance to correct their behaviour."

The documents added that they had shown remorse "and promised they will not repeat it again".

In the documents, the prosecutors say the pair's deeds contradicted the Aceh Government's attempts to uphold sharia law in the province.

Under sharia law the other punishment options available to the judges are a fine of 1000 grams of gold or 100 months in jail.

While this is the first prosecution specifically for homosexuality, gay people in Indonesia have been previously punished under anti-pornography laws.

A group of 14 men in Surabaya are awaiting trial for holding a party that allegedly included the viewing of gay videos.

The men from Banda Aceh will be caned soon after their sentencing hearing next week.