A man brandished a knife at an ice cream shop worker after refusing to sell him a bottle of bubblegum flavour syrup.

Adam Walker had only walked free from court hours earlier after being spotted carrying a knife in the middle of the street the previous day.

He walked out of Forfar Sheriff Court and went to an ice cream shop in the Angus town and placed an order without incident.

Two hours later he returned and demanded a bottle of bubblegum syrup.

He began to shout and swear at the shop assistant who refused to sell him the bottle before telling the man to "go back to Syria where he came from".

Fiscal depute Eilidh Robertson said: "A delivery driver then came into the shop and the complainer asked for help to remove the accused from the shop.

"He left but then re-entered and began shouting again. He was erratic - laughing one minute then acting aggressively.

"He returned a short time later carrying a lock knife and had removed his shirt. He waved the knife around."

She added: "He was seen on CCTV in the shop and on the street outside carrying the knife.

"When he was detained he said he collected knives as a hobby."

Describing the previous day's incident that had led him to be in court, the prosecutor added: "A nine-year-old girl was playing when she saw the accused standing in the street with another man.

"He was holding a large knife and she ran home to tell her mother and her partner. He was seen holding the knife and using an object to sharpen it, causing sparks to come from it.

"It was approximately ten inches long. He then placed it in a sheath. He then took out another knife and flicked it open and closed."

Ms Robertson continued: "A short time later he was found slumped in a close outside a flat with objects that had come from inside it.

"He was possession of that large knife and the sheath and the other knife were found inside."

Walker, 31, a prisoner at HMP Perth, pleaded guilty on indictment to charges of theft by housebreaking, possession of knives and behaving in a threatening and abusive manner committed on September 14 and 15.

Defence solicitor Craig Scott said: "He collects knives. He has a display cabinet for them in his home for keeping them in though they obviously weren't in there on these occasions."

Sheriff Alastair Brown deferred sentence until January 4 for social work background reports and remanded Walker in custody.

He said: "These knives are weapons designed for combat. The lock knife has no conceivable use as a tool. These are not suitable for anything other than stabbing people."