Liam Allen, 22, a prolific criminal with a fondness for drugs and dangerous weapons, was stopped by police on The Esplanade following a short foot chase, York Crown Court heard.
Plain-clothed officers pounced after spotting another man, a known drug user, apparently waiting for someone in the Italian Gardens, said prosecutor Rob Galley.
“(Allen) came walking towards that person,” he added.
On seeing the officers, Allen suddenly ran off towards bushes near the cliff and discarded “something” as he scarpered. This item was never recovered.
The officer caught up with him at Spa Bridge and he was arrested.
Allen initially gave the officer a false first name and removed his rucksack, inside which was a ‘Zombie’ knife, a terrifying, Gerber machete-type weapon which has increasingly become the weapon of choice for hardened criminals.
The serrated knife had a 12-inch blade and “could do quite a lot of damage”, said Mr Galley.
Police also found a small amount of cannabis and some money on Allen, who had only just been released from prison for attacking emergency workers.
Allen, of no fixed address, was charged with possessing a bladed article and a Class B drug and admitted both offences. He appeared for sentence via video link on Thursday after being recalled to prison.
The court heard he had a long criminal history dating back to his youth. His 33 previous convictions for 62 offences included battery, arson, dealing heroin, robbery, handling stolen goods, criminal damage and two previous offences of carrying a blade.
He was jailed for three years in 2018 for possessing a knife and attempted robbery and imprisoned for 12 weeks in September this year for assaulting two emergency workers.
Julian Jones, mitigating, said Allen had had a “very troubled” upbringing and had been “in and out of the care system”.
Allen had been moved into a hostel in Wakefield after being released from his last prison sentence but left three days later, on October 15.
“He went to Scarborough (for) somewhere to go,” added Mr Jones.
Judge Simon Hickey described the ‘Zombie’ knife as a “wicked weapon”.
“There is no reason, in this country, for people to be carrying knives of any sort, never mind anything as threatening as that”, added Mr Hickey.
He said the machete-type knife was “capable of inflicting significant damage” and of particular concern was the fact that the incident occurred in the middle of the afternoon and there may have been tourists and children in the area.
Jailing Allen for six months, Mr Hickey said it was the “least” sentence he could impose.