A military court sentenced an army captain to six months of imprisonment suspended for one year Wednesday for sleeping with another male soldier.
The ruling drew quick condemnations from his lawyer and human rights groups.
The captain, whose name was undisclosed, collapsed in the courtroom after the verdict was read. Under the ruling, the captain is not obliged to spend time in jail physically as long as he shows good conduct during the next year. The man will be dishonorably discharged if he does not appeal the ruling.
Homosexual activity is illegal in the Korean military and can be punished with up to two years in prison if a soldier is caught having gay sex.
According to the Center for Military Human Rights Korea, the captain was arrested on April 17 after having sex outside the military compound. There was mutual consent between the two men.
"It's a ridiculous ruling," Kim In-sook, the captain's lawyer, told the Associated Press.
The center called the court's decision a shame.
"The government labeled its soldier a criminal just because he had sex with another male. This is a shame for Korea which has been on the United Nations Human Rights Council."
The center also criticized the military for conducting illegal and inhumane investigations into the private lives of its servicemen.
His arrest last month came amid rising allegations that the Korean military was hunting down gay soldiers. The center claimed the military had conducted an extensive investigation in February and March and caught up to 50 gay soldiers. The center released an audio file of the army chief ordering the hunt-down, but the military dismissed the allegations, saying that it was only probing an online video where two male servicemen were having sex.
The arrest prompted gay rights activists to protest in front of the Ministry of National Defense with a demand to release him.
Amnesty International called the Wednesday's ruling a gay witch-hunt.
"This unjust conviction should be immediately overturned," said Roseann Rife, the East Asia Research director at Amnesty International. "No one should be persecuted based on their sexual orientation, activity or gender identity alone. What counts is their service not their sexuality."
Rife also urged President Moon Jae-in to act to protect the gay soldiers. "President Moon Jae-in needs to send an unequivocal message that discrimination on the basis of sexual orientation or gender identity will not be tolerated, including in the military."
A former human rights lawyer, Moon does not seem so tolerant. During a nationally televised presidential debate last month, he said, "I don't like homosexuality."