A first offender was caught in public with a 'handgun'.
Kieran Kerslake, 27, was snared with the imitation firearm on Byers Road in Glasgow's west end.
He initially kept the gun in his waistband before making a cocking motion with it near a concerned onlooker.
Kerslake pled guilty today at Glasgow Sheriff Court to having an imitation hand gun without lawful authority or reasonable excuse.
The court heard the witness approached Kerslake to ask him for a cigarette September 1, 2020.
Prosecutor Gail Campbell said: "While Kerslake was reaching for a cigarette, the witness observed what he perceived to be a handle of a hand gun in his waistband.
"This caused the witness alarm and when he took the cigarette he made off in the opposite direction but continued to observe him from a distance.
"He saw Kerslake pull the hand gun from his jeans and put it in his hand.
"He saw him repeatedly put the barrel of the gun a cocking motion."
A 999 call was made and fire arm officers traced Kerslake to Byers road where a search recovered the gun from his jeans.
Ian McCarthy, defending, told the court that Kerslake was drunk at the time.
The lawyer added: "He has no record and it was a carry on which he accepts fully the serious consequences and was in custody overnight."
Sentence was deferred pending background reports until next month by sheriff Tom Hughes.
Kerslake, of the city's Hillhead, had his bail continued meantime.