Media playback is unsupported on your device Media caption Byun Hui-soo says she will fight to remain a soldier

A transgender soldier in South Korea says she will sue the army after it dismissed her for violating regulations following her sex change.

Byun Hui-soo, 22, joined the army as a man but had gender reassignment surgery last year after suffering from gender dysphoria and mental health issues.

She accused the military of "deep-rooted intolerance" of sexual minorities.

South Korea remains conservative on matters of sexual identity.

Ms Byun's case has led to debate over the treatment of transgender soldiers as well as those from the wider LGBT community.

All able-bodied South Korean men are required to carry out military service for nearly two years.

What did Byun Hui-soo say?

During an emotional 45-minute appearance, the staff sergeant said she had wanted to stay in the army after her operation, which took place in Thailand in November.

"I will continue to fight until the day I can remain to serve in the army. I'll challenge the decision until the end, to the Supreme Court," she said.

She had not planned on having gender reassignment surgery, she said, but was recommended to do so by doctors at a military hospital where she was sent after suffering mental health problems. They arose from gender dysphoria - defined as distress from the internal conflict between physical gender and gender identity.

"It was an extremely difficult decision to let my base know of my identity, but once I did, I felt much better," she said.

"I thought I would finish serving in the army and then go through the transition surgery and then re-enter the army as a female soldier. But my depression got too severe," she added.

Ms Byun said she had not expected to be forced to leave the army. Her superior officers had visited her in hospital and had been discussing where she would be redeployed after her treatment, she said.

They had suggested she could become a role model for LGBT people in the armed forces, she said.

"Apart from my gender identity, I want to show everyone that I can also be one of the great soldiers who protect this country," she added.

What has the military said?

In its ruling, the military said the case "constitutes a reason for being unable to continue service".

A defence ministry spokesman told AFP news agency that the soldier had been undergoing tests at a military hospital, which classified the loss of male genitals as a mental or physical handicap. That prompted a panel review of her service. The military does not have regulations governing the service of transgender soldiers.

The military statement added that it was determined to avoid "unfair discrimination and treatment".

Image copyright AFP Image caption South Korean men are required to serve in the military for nearly two years

But Lim Tae-hoon from the Center for Military Human Rights said Ms Byun's discharge was unusual because it was effective the day after the decision was made. Usually they are effective after a period of up to three months, he said. It suggested that the army did not want Ms Byun to have contact with her unit, Mr Lim said.

An army official who was aware of the case told Reuters news agency there should be no reason for the military to deny Ms Byun if she reapplied to serve in the female corps after legally becoming a woman.

How are attitudes towards transgender people in South Korea?

In South Korea, being LGBT is often seen as a disability or a mental illness, or by powerful conservative churches as a sin, and there are no anti-discrimination laws in the country.

In Ms Byun's case, anti-LGBT campaigners had attempted to identify her online. They also held demonstrations urging the military to dismiss her after news about the case emerged and have called for further demonstrations.

Rights groups that have taken up her cause have been accused of tarnishing the military's image.

However BBC Korean's Hyung Eun Kim says that the rise of events such as LGBT parades shows attitudes in the country are changing, albeit slowly.

Rights groups have also previously expressed concern about the way South Korea treats gay soldiers. They are banned from engaging in sexual contact and can face up to two years in prison if caught. Gay sex is not illegal in civilian life.

Media playback is unsupported on your device Media caption Gay South Korean soldier: "I'm constantly afraid"

Where in the world can transgender soldiers serve?

They could in the US, until President Donald Trump banned certain transgender people from the military. The ban was upheld by the Supreme Court last January although legal challenges have been continuing in lower courts.

The policy prohibits "transgender persons who require or have undergone gender transition" from serving.

Mr Trump announced on Twitter in 2017 that the ban was needed due to "tremendous medical costs and disruption".

There are nearly 9,000 active duty transgender troops, non-profit groups say.

The move reversed Obama administration policy that ruled transgender Americans could serve openly in the military as well as obtain funding for gender reassignment surgery.

In the UK, transgender people are able to serve openly in the military. Last June a transgender former army officer was awarded a medal for services to the LGBT community in the military.

Other countries to allow transgender people to serve openly include many Western European countries, Australia, Canada, New Zealand, Israel and Bolivia.