A man had an imitation firearm at a sheltered accommodation block in Ludlow and was threatening to kill himself, a court heard.
When police arrived at Ludlow Foyer in March 21-year-old Stefan Jones was saying he felt suicidal and had a number of weapons.
At Shrewsbury Crown Court last week Jones was given a 12-month community order with a rehabilitation requirement.
Judge Jim Tindal said a security guard at the block had acted “magnificently" in handling the situation.
"The only person being threatened was yourself. You were in a desperate state," he told Jones.
At an earlier hearing Jones had admitted possession of an imitation firearm with intent to cause fear or violence and having a knife as an offensive weapon.
Mr Kevin Jones, prosecuting, said the defendant lives at the sheltered accommodation in Ludlow and a security officer had responded to concerns about Jones who had said he felt suicidal.
He said that the defendant was carrying a knife, an axe, a BB pistol loaded with plastic pellets and the imitation firearm.
Mr Peter Gilmour, for Jones, said his client had been getting support and had involved in a number of courses and voluntary sessions.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here