Officers from Scarborough's Neighbourhood Policing Team were called on Monday January 17 at around 7.30pm after reports of a man who was believed to have a knife.
A 22-year-old man was quickly identified and arrested for possession of a knife/sharp pointed article in a public place after entering a fast food restaurant on Huntriss Row.
The Neighbourhood Policing Team had been conducting targeted evening patrols in the town centre, to reduce and prevent anti-social behaviour before they were diverted to the restaurant to join Expedite Crime Team officers.
North Yorkshire Police said the man has been charged and is set to appear at court.
A police spokesperson said: "We would like to thank the person who made the call to alert us."
Information can be passed on to North Yorkshire Police on 101 and quoting reference number 12220009324.