A transgender thief has avoided jail because she didn’t have the paperwork to prove she is a woman and couldn’t be sent to a male prison.

Leila Le Fey was sentenced to six months in prison for threatening a shop worker with a claw hammer so she could steal wine at a Budgens in Brighton.

She was taken into custody but released after an hour as her barrister Rebecca Upton argued that as Le Fey did not have certified evidence of her gender reassignment, she would have to go to the male-only Lewes Prison.

Ms Upton told Lewes Crown Court that as prison rules meant that Le Fey could not be kept in solitary confinement she would be a vulnerable prisoner, Brighton Argus reports.

She added: “The only way Le Fey could prove her new gender would be an ‘undignified examination’, one which court staff were not prepared to do.”

The court heard the 40-year-old threatened to hit manager Enoch Adetayo with the hammer when he challenged her as she tried to steal the alcohol on November 6.

Le Fey was sentenced at Lewes Crown Court

Ms Upton said Le Fey, who lives in Brighton, battled with drink and drug addictions and had out of trouble since 2014 before a relapse last year.

Judge Stephen Mooney said: “Having reflected again upon the impact an immediate custodial sentence would have, the difficulties there are and the intractable problems the prison service would face, I have reconsidered whether imprisonment must be immediate.

“In light of this information I have come to the conclusion that in your particular case it allows me to hope for some form of rehabilitation.”

Le Fey admitted common assault and possession of an offensive weapon and had her jail sentence suspended for six months and must attend 30 rehabilitation sessions.