A knifeman punched a pub customer who refused to give him a cigarette then brandished a large blade at shocked witnesses.
Gary Llewellyn hit the smoker, who was having a cigarette outside the Chichester Arms, in South Shields, then used a kitchen knife he pulled from his waistband to swipe at and chase people who came near.
Newcastle Crown Court the 24-year-old, who had taken alcohol and cocaine, briefly took the weapon, which had a blade of around eight inches, inside the bar before leaving the area.
Llewellyn, who had been back on the streets for just three months after his last prison sentence, was arrested nearby.
He pleaded guilty to affray, possession of an offensive weapon, assault by beating and possessing a small amount of cannabis which was found when he was searched at the police station.
Mr Recorder Jonathan Sandiford sentenced Llewellyn, who has 69 previous convictions, to 22 months behind bars.
The judge told him: "It was an offence committed inside and outside the pub.
"There were other persons present, there is evidence of at least one child having seen what went on, which eventually became you running around with a knife in your hand.
"It goes without saying, that the carrying of such a weapon and the production of it in circumstances like this is a serious matter.
"A situation that might just be fisticuffs could easily have got out of hand. Once a knife is produced where people have taken drink, people are full of bravado,suddenly what is a fist fight can turn into a manslaughter or murder.
"This knife was produced and on a number of occasions swiped towards people, there was a risk of serious injury."
The judge said Llewellyn, of Pine Street, Jarrow, has a "fearsome" criminal record, which includes brandishing a samurai sword at people in the past.
Paul Rowland, prosecuting, told the court a customer had been standing outside the bar smoking on April 22, facing towards the nearby Metro station.
Mr Rowland said: "The defendant engaged in conversation and said 'are you going to give me one of them', relating to the cigarettes.
"The witness said 'no' and the defendant said 'you will'.
"At that point, he went to punch the witness with a clenched fist to his face and made contact with his chin."
The court heard Llewllyn then took the weapon from his waistband and brandished it at people while "running around" inside and outside the pub.
Graeme Cook, defending, said Llewellyn's relationship had broken down that day and he "went back to his addiction, cocaine".
Mr Cook added: "That, coupled with drink, put him in the position he finds himself.
"He stupidly asked for a cigarette, didn't get it. He was waving the knife around."
Mr Cook said Llewellyn is genuinely sorry for what he did.