North Somerset Courthouse heard how Samuel Marshall, of Wooler Road, drew a kitchen knife with a five-inch blade because he was not admitted to Juniper ward, which provides care for those with mental health problems.

Leslie Ness, prosecuting, told the court 25-year-old Marshall has suffered with mental health issues and was not getting the help he required.

She said: “On April 7 he went to Weston General Hospital, asked to get admitted to the Juniper unit, but was refused.

“He had a knife in his pocket and when he spoke to a receptionist, who said she would not be able to help, he produced the knife in front of her.

“No threats were made to any member of staff.

“He said he needed psychiatric help and that he was suffering from suicidal thoughts. He also said he is a danger to the public and himself and he needs to be locked away.

“He did not want to hurt anyone with it but felt it was the only way of getting people to listen to him. He feels he is a good person but could not cope with what his mind wanted him to do.”

Naomi Cox, mitigating, said: “He was desperate, had no intention of hurting someone, but just wanted to do something so shocking to get help.

“He has had time to reflect and knows the right way to go about things was to immediately phone the crisis team in the mental health department.

“He is quite open and happy to engage with probation and wants to do that to get further assistance in the future.”

Marshall pleaded guilty to a single charge of possessing a bladed item in a public place, and was given a community order for 12 months with a supervision requirement. He will have to engage with the probation service and keep them informed of his whereabouts.

He was ordered to pay £85 court costs, a £60 victim surcharge and magistrates ordered the knife to be destroyed.