Shocked medical staff found a large kitchen knife in the pocket of a semi conscious patient, a court has heard.
Patrick Ellaway, 55, of Empire House, Church Street, Preston, was taken by ambulance to the A and E department at Blackpool Victoria Hospital at around 8pm on November 15 last year.
A decade ago nurse Jane Clough was stabbed to death in the car park of the hospital by her abusive ex partner.
Prosecuting Paul Cummings said Ellaway was described as a drunken male with a head injury.
He added: "Paramedics who had treated him conveyed him to the hospital and told nurses he had a knife in his jacket pocket. A knife was then retrieved from his coat and kept to one side until police arrived. Police then spoke to the defendant.
"Eventually he said he had the knife for his own protection because people were after him."
Recorder Carwyn Cox said he had to impose a minimum of six months on Ellaway - due to the fact he had previous convictions from 2012 and 2017 for possessing a knife - unless it was unjust to do so.
Defending, Beverley Hackett said Ellaway had been to prison before and it "hadn't worked".
She added: "As poor as his decision making was, as difficult as it is, perhaps it is time to offer this defendant some assistance rather than simply locking him up.
"He is clearly somebody who finds day to day life, coping with anxiety and things that go wrong, very difficult."
Recorder Cox said: "In interview you said you must have left it in your pocket by mistake before then saying you had it on you for protection as people were after you.
"This is obviously a serious matter because you have previous convictions for this offence.
"You had on you a dangerous weapon, and a dangerous weapon more so in the hands of someone who's not in control of themselves because they are intoxicated.
"I'm afraid having listened to the circumstances, I don't find it would be unjust to impose the minimum sentence of six months."