Banned from begging and sleeping in shop doorways in Middlesbrough, Bradley Grimes asked the judge in court to send him to prison rather than leave him homeless. What effect did it have?
"All they've done is placed an anti-social behaviour order on me to try and stop me from begging. But I have to in order to survive," Bradley Grimes tells the BBC's Victoria Derbyshire programme.
He became homeless after leaving the care system aged 17.
With autism and, in his own words, the mental age of a "young child", he was unable to find work and frequently turned to begging - asking passers-by for food and money at the side of a busy street.
But this led to Middlesbrough Council giving him an anti-social behaviour order, or Asbo.
It came with a condition banning him from "loitering" outside business premises.
Bradley says it prevented him from "basically sitting outside a shop" and sleeping in doorways for warmth, and meant he was continually arrested.
"CCTV picks you up and they dispatch either the police or street wardens. If police come, you're arrested," explains Bradley, who's now 23.
He says he attracted the authorities' attention for sitting rested against a bus stop.
"It got to the stage where they were locking me up once or twice a day, for a period of a few months.
"I was in [prison] pretty much all weekend, near enough every weekend.
"I can't even sit on a public bench without being locked up. I have to keep moving."
Frustrated at his situation, he decided to seek help - albeit in an unusual form.
When in court, charged with breaching a four-month suspended jail sentence - something he admitted to doing - he asked the judge to send him to prison.
He hoped it would pave the way to him being found suitable accommodation.
"That's the last option I had, that I could think of," he explains.
The judge was sympathetic, and was reported in October this year as saying that "essentially we are locking up a homeless man for being homeless.
"I want him housed somewhere so that his welfare can be looked after.
"It is not good enough for the authorities to turn around and say that it is somebody else's problem.
"If I were to let you go today the chances are that you would be sitting on a seat or sleeping in a shop doorway and you will be locked up again."
By November, Bradley was released - with supported accommodation made available.
He had lived in the same building previously, but says he was told to leave after cannabis was found in his room.
Bradley has also had problems with Class A drugs, which he says he used "to take the pain away".
This time he says he is determined to live clean, and has avoided drugs since his release.
'Impossible to cope'
Bradley says life can still be tough. In fact, he believes that because of his autism, it was simpler in prison.
"You don't have to worry about anything in [jail].
"[Whereas on the outside] it's impossible for me to cope on my own, because I'm bad with things like budget and money."
When Bradley left prison in Durham, he had just £17 to his name - most of which he used for the train journey back to Middlesbrough.
He has now applied for benefits, which he is waiting to receive, but says his lack of funds over time has had a significant impact on his health.
Bradley has a brain tumour - and suffers with epilepsy and a heart murmur - but says he cannot afford to travel to the specialist cancer centre in Newcastle for treatment.
He says his story could have been different had he been supported sufficiently by the local authority when he first became homeless.
Instead, he claims he was sent from one agency to another.
Middlesbrough Council has not yet responded to request for comment.
While walking around town Bradley spots a friend, a homeless man named Tony who says he cannot get any help at all.
Tony says he has to steal from drug dealers to have enough money to survive.
It is not something Bradley condones, but the desperation behind the act is something he says he understands.
Watch the Victoria Derbyshire programme on weekdays between 09:00 and 11:00 on BBC Two and the BBC News Channel.