An appeals court ruled Wednesday that a Danish trans woman who changed their legal gender while in prison but did not receive gender-affirming surgery must spend her sentence in a men's prison.

While serving a term for severe rape, the 62-year-old altered her legal gender from male to female in 2015.

On Wednesday, Denmark's Eastern High Court ruled that the prisoner would constitute "a not insignificant security risk for the female inmates."

PHOTO | COURTESY Isla Bryson

The convict sued the Danish prison service and Hestedvester prison in greater Copenhagen, but both the district and upper courts concluded that she must serve her sentence in a men's section.

A person of the same sex must examine an inmate that entails undressing, according to Danish law.

However, the court ruled that the convict being "strip-searched by men" and required to "provide a urine sample" under the supervision of males did not breach the law on sentence execution since it determined that references to gender in the law should be "understood as the biological sex."

The Eastern High Court also found that the inmate's placement in a male section did not breach her rights because it was based on a security assessment rather than a lack of recognition of the legal gender.