The South Korean defense ministry classified the removal of her male genitals as a mental or physical handicap discharging her from the military last January
A South Korean court on Thursday ruled it was unfair for the military to forcibly discharge a soldier over her gender-reassignment surgery, months after she took her own life over the decision.
South Korea remains deeply conservative about matters of sexual identity and is less tolerant of LGBT rights than some other parts of Asia, with many gay and transgender Koreans living largely under the radar.
Byun Hee-soo, formerly a staff sergeant and in her 20s, enlisted voluntarily in 2017. She went on to have gender-reassignment surgery in 2019 in Thailand.
The defence ministry classified the removal of her male genitals as a mental or physical handicap, and a panel ruled in January last year that she would be compulsorily discharged.
Her case was the first of its kind in South Korea, and she filed an administrative suit against the decision in August last year.
But she was found dead at her home about seven months later.
The Daejeon District Court ruled in her favour, saying the military should have officially accepted her as a woman post-surgery.
Also Read - South Korea's President Moon raises dog meat ban
"Immediately after her reassignment surgery, the court had accepted" her request to be legally recognised as a woman, the court said, according to South Korea's Yonhap News Agency.
Had she been officially recognised as female, the court added, it would have been impossible for military authorities to conclude that she had "a mental or physical handicap" and discharged her.
Seoul's defence ministry told AFP that "we respect the court's decision", but it has yet to decide whether to appeal.
South Korea has a conscript army to defend itself against the nuclear-armed North, with all able-bodied male citizens obliged to serve for nearly two years.
But Byun was a volunteer non-commissioned officer and said at her press conference last year that serving in the military had always been her childhood dream.
Her death has triggered an outpouring of grief and calls for South Korean MPs to pass an anti-discrimination bill.
International rights groups have expressed concern about the way the country treats gay soldiers, who are banned from engaging in same-sex acts and can face up to two years in prison if caught -- even though such actions are legal in civilian life.