A machete wielding man left a taxi passenger and passing families in fear after waving the weapon above his head in a busy city centre street.
Victim Brian Finch was on his way to meet friends in the Bluebell Hotel in Preston when he spotted drunken Marcin Kozierowski, 31, "completely out of control and shouting in Polish".
Preston Crown Court heard the defendant looked straight at the terrified man, who threw a pound coin on the floor to distract him so he could get away from him and alert police.
He is now starting a nine month jail term.
Prosecuting Paul Cummings said the incident happened at 4pm on Grimshaw Street.
He said: " The defendant was waving a sword he was waving it over his head.
The witness understandably became concerned for his own safety and thought he would distract the def by throwing down a pound coin onto the ground.
"When he was sufficiently far away he phoned police and kept the defendant in his view.
"The defendant had seen police approaching him and put the sword behind a pallet."
After his arrest he failed to attend court.
Defending, Mark Stephenson said Kozierowski moved to Preston in 2014 with his wife and seven year old son, and was employed as a car sprayer.
But he found himself homeless, out of work and drinking too much after they split up
His client, who has no other convictions, had fallen on "desperate times", and was sleeping rough.
He said: " In truth he was drinking far too much at the time of this offence and had been doing for quite some time.
"He has got his life back together with the help of his uncle and handed himself in on December 29 to face up to his problems
He admitted possessing a bladed article in public and failing to surrender to bail last July.
Recorder Joanne Woodward said: " He had the honest belief that you were going to attack him with the machete.
"He said he couldn't believe you were in possession of a machete in the street and this was in front of families due to the time of day and the city was busy.
"He was unaware of what you were capable of."
She said she accepted his remorse was genuine but was satisfied he caused serious alarm or distress to the public.