A homeless man walked into Huddersfield police station and told officers he had a knife because he wanted to get back into prison.
Leeds Crown Court heard Sanchez Simpson had done something similar in October last year when he approached officers outside the station and told them he had a knife and needed help.
On that earlier occasion he was arrested and received six months in jail.
Philip Adams, prosecuting, said at 9.50am on August 22 this year Simpson went into the inquiry office and told those present he had a knife and wanted to go away.
He was searched and told the officers he had the knife in his waist band and a kitchen knife with a five inch blade was found and he was arrested.
He said he just wanted to go back to jail.
He said: “I wasn’t going to use it, I just wanted to get arrested” adding that he felt depressed.
Georgina Goring, representing Simpson, said his actions were “a cry for help” when he was at a low point in his life.
She added: “He had been homeless for five months and felt completely on his own and that the world was coming down on him.”
She said Simpson had felt scared to ask others for help but was now engaging in prison with those who could help him on his release and was feeling more positive about the future. He hoped to enrol in courses.
Simpson, 25 of no fixed address, admitted possessing a knife in a public place and was jailed for six months.
Judge Christopher Batty said that was the minimum sentence for his second offence of that type. He told Simpson to take advantage of the help he would be given when he is released on licence and warned him not to repeat his actions.
“You can’t do this, you can’t carry knives around,” he said. “If something goes wrong there is the temptation to use them and that can have fatal consequences. I sincerely hope you do sort yourself out and we don’t see you again.”