South Korea's Constitutional Court on Thursday upheld a military law banning homosexual behaviour, saying the need to maintain discipline takes precedence over individual sexual freedom.
In a 5-4 split decision, the court ruled that the military criminal code which punishes homosexual behaviour with up to one year in prison is constitutional.
"The legal code cannot be seen as discrimination against gays because such behaviour, if left unchecked, might result in subordinates being harassed by superiors in military barracks," it said in a statement.
The law's purpose was to ensure discipline within the whole military organisation, the court said.
The ruling came after an army military court filed a petition with the Constitutional Court. It asked whether the military criminal code, written in 1962, was discriminatory against gay soldiers and thus unconstitutional.
Homosexuality is not illegal under the civil legal code.