DORASAN, SOUTH KOREA APRIL 7: South Korean Soldier Dorasan train station on april 07 2013 in Dorasan, South Korea. Located in DMZ between the two Koreas, Dorasan Station opened in 2002 but is still unused. Photo: Shutterstock

DORASAN, SOUTH KOREA APRIL 7: South Korean Soldier Dorasan train station on april 07 2013 in Dorasan, South Korea. Located in DMZ between the two Koreas, Dorasan Station opened in 2002 but is still unused. Photo: Shutterstock

A South Korean military court on Wednesday sentenced an army captain to a suspended prison term for having sex with a fellow male soldier in a ruling human rights groups criticized as regressive and intimidating.

A lawyer for the captain said her client was being punished for having consensual sex with his partner in a private space. She said the captain was briefly treated at a hospital for shock following his conviction.

“It’s a ridiculous ruling,” said lawyer Kim In-sook. She said the military penal code, which makes homosexual activity punishable by up to two years in prison, was unconstitutional because it tramples on basic human rights and dignity.

South Korea’s military, which doesn’t reveal how often it pursues cases against soldiers suspected of being gay, didn’t immediately make a statement.

Kim said it’s unclear whether her client would appeal his six month prison sentence that was suspended by a year because he felt tormented by the legal process. He will be dishonorably discharged if the ruling stays.

The captain was arrested last month amid allegations by a watchdog that South Korea’s military was hunting down and prosecuting gay servicemen. South Korea’s army has denied such claims, saying it was conducting a criminal investigation of soldiers who posted a video on the internet of two male soldiers having sex earlier this year.

Lim Tae-hoon, who heads the Military Human Rights Center for Korea, which complained about the crackdown, said in an earlier interview with The Associated Press that neither the captain nor his partner had anything to do with the soldiers involved with the video leak.

According to Lim, military investigators used the information gained from their inquiry into the video case to track down other gay soldiers. Investigators threatened soldiers to out their gay peers, confiscated cellphones to check communication records, and even used dating apps to dupe soldiers into revealing their sexual identity, Lim said.

Lim’s group released a statement denouncing Wednesday’s ruling, saying that it “turned the clock of history backward.”

“Sexual minorities who are always living in danger of being outed by others now must live in fear that they could be tracked down at any time and interrogated over their private lives,” the group said.

Roseann Rife, East Asia research sirector at Amnesty International, called for the “unjust conviction” to be immediately overturned.

In conservative South Korea, gays, lesbians, bisexual and transgender people are harshly stigmatized and struggle to be politically visible, while a powerful Christian lobby immobilizes politicians seeking to pass anti-discrimination laws. That stigma is amplified in the military, where most able-bodied South Korean men are required to serve about two years as the country maintains a large force in the face of potential conflict with North Korea.

Gay men are not exempt from conscription but are banned from engaging in homosexual activity while serving, leading to an environment in which they serve without revealing their sexual identity for fear of discrimination and reprisals.

© 2017, Associated Press, All Rights Reserved.

This material may not be published, broadcast, rewritten, or redistributed.