An ex-soldier shocked passers-by when she flashed her penis and committed a vile sex act with a bin in public.

Chloe Thompson, 42, was caught in an alley as she used a sex toy that she attached to the bin in Middlesbrough, England.

Teesside Crown Court heard how she behaved in an “overtly sexualised manner in the presence of families and children” on August 13 last year.

On the same day, she exposed herself while thrusting her hips in the window of her home, and three children witnessed it, reports Teesside Live.

One witness described seeing “a male on the street”, “wearing women’s clothing” and seeing that person “lifting and playing with their penis”.

The court had heard how Thompson was “somebody who is going through a number of difficulties” and is “struggling to decide who she is”.

Ex-soldier charged to court for flashing pen!s and committing vile s3x act with a bin

Defending Tom Bennett said: “She is trying to make changes but certainly at the start of that process felt somewhat isolated and erratic in her behaviour.”

Thompson had been due to be sentenced on Tuesday, April 12, but the judge asked for more information in order to assess if “structures can be in place to protect the public from such behaviour” if he were to hand out a suspended jail term.

Judge Stephen Carroll asked the probation service to produce an addendum report to consider if Thompson would comply with a period of deferment of three months before sentencing was passed.

“Due to the duration and unpleasantness a custodial sentence is inevitable,” he said.

“The only thing I need to find out is whether it could be suspended, given the challenges you faced and the time that has lapsed and the work that has been done during this difficult time.”

The judge told Thompson he was aware of the challenges faced “in terms of your gender identity”.

He described the offending as “repugnant and offensive to the people around you.”

“You are entitled to appropriate respect and courtesy and assistance in facing the challenges ahead of you but that respect goes both ways,” he said.

Andrew McGloin, defending, said Ms Thompson is “an individual who feels, at this point in her life, very optimistic and hopeful for the future”.

McGloin said Thompson plans to attend a gender clinic which may lead to her undergoing gender reassignment surgery.

About two and a half years ago she expressed a wish to change her gender and, following that decision, has changed her name to Chloe Thompson,” he explained.

“It’s been a very emotional journey for her and she has, at times, suffered with mental health problems which have been exacerbated with periods of homelessness.”

Thompson has 17 convictions for 22 offences and was still under a suspended sentence order at the time of her latest crimes.

Thompson admitted three charges in relation to her latest offending.

She was granted conditional bail and must return to court on April 26.