A homeless man burst into Southampton Civic Centre and brandished a steak knife, nearly stabbing a council worker.

Piotr Matejcowski forced his way through a locked door at the civic centre on December 15 last year, hitting it and running and jumping into it. 

Southampton Crown Court heard how the 42-year-old was then confronted by staff who told him he needed to leave, prompting him to repeat the words "no violence, no violence". 

But after he began walking at them, they attempted to restrain him, at which point he lunged at one of them, producing a small steak knife and holding it in a "stabbing motion". 

Prosecutor Keely Harvey said Matejcowski then turned back to the rest of the group and began "driving it down into his own wrist".

But when others shouted at him to try and stop him from self-harming he made three stabbing motions towards one staff member.

Staff who were involved later said they believed the knife was going to be swung at them with one recalling how he thought he was going to "get stabbed and either seriously or fatally injured".

One of then suffered a cut on his hand as he tried to grab the knife.

It was then knocked out of his hand and Matejcowski was restrained before the police arrived.  

The incident took place just days after he was spotted sitting dangerously close to a railway junction, cooking himself food

Mitigating, Mark Florida-James said: "Clearly this was a terrifying event," but added that it was "not intended that others would be harmed".

"He says 'no violence no violence' and is ashamed.

"This is a man who as the psychological report says was issuing a cry for help.

"[He is] under no doubt that this could have been so much more serious not just for him but for other people.

"He is determined to make amends for what he has done. It must have been traumatic for those individuals."

READ MORE: Man faces jail after threatening to 'destroy' Caroline Nokes MP

Matejcowski, who has no previous offences, pleaded guilty to possession of a knife in a public place, criminal damage, assault by beating and common assault. 

He was given an 11-month sentence suspended for 18 months with 25 rehabilitation days and 180 hours of unpaid work. 

Judge Nicholas Rowland said this was "wholly out of character" adding that he is a "relatively mature educated man".

"Frightening and assaulting those people who are to be commended for the actions they took in seeking both to disarm you and help you."

A spokesperson for Southampton City Council said: "Immediately after the incident all staff involved were offered support and managers debriefed the incident.

"Despite the distressing and frightening incident for the Housing staff and City Welfare Wardens involved, they still managed to act fast in response, whilst maintaining the utmost professionalism.

"The Chief Executive has met with the staff to thank them for their quick thinking in a difficult situation.

"Since the incident, physical security has been improved at the entrance."