High Court judges have ruled that it is lawful for transgender women to be housed in female prisons.
A legal challenge was brought against the Ministry of Justice over its policy of allowing inmates to be housed in accordance with their gender identity rather than biological sex.
The woman who brought the challenge, named only as FDJ, argued that female inmates would be exposed to an increased risk of sex attacks should they be put with a transwoman with a history of sexual violence.
Lord Justice Holyroyde accepted that the policy may cause "fear and anxiety" among women inmates and recognised that many female prisoners are the victim of sexual assaults and domestic violence, The Telegraph reports.
But he concluded that maintaining the status quo balances the rights of women and transgender people.
He added that the placement of trans female prisoners could be considered on a "case by case" basis by a specialist panel.
This panel should also be responsible for screening out those with a history of predatory behaviour and ensuring they are placed into specialist wings or under supervision, or alternatively housed in male prisons.
Lord Justice Holyrode said that such a panel could in his view "be expected to be astute to detect any case of a male prisoner who, for sinister reasons, is merely pretending to wish to live in the female gender."
He added: "I can accept, at any rate for present purposes, that the unconditional introduction of a transgender woman into the general population of a women's prison carries a statistically greater risk of sexual assault upon non-transgender prisoners than would be the case if a non-transgender woman were introduced.
"But that statistical conclusion takes no account of the risk assessment which the policies require."
A MoJ spokesman told the newspaper: "We are pleased the court agrees that the way we manage transgender offenders strikes the right balance between protecting their legal rights and ensuring the safety of all prisoners."