A robber has been jailed for a total of five years after a court heard he threatened staff at a Huddersfield coffee shop with a knife.

Staff tried to stop him stealing a mug containing their tips.

Leeds Crown Court heard Aaron Joseph Bailey had already committed other offences last year including trying to rob a schoolgirl, before his early morning visit to Costa Coffee in Leeds Road on June 1.

Alasdair Campbell prosecuting said it was 6.15am as staff were preparing to open when Bailey walked in and picked up the mug containing about £10 in tips. He put it in his pocket and began to walk out but was then challenged by Cameron Livingstone who asked him what he thought he was doing.

Bailey produced something wrapped in white material from his pocket and told the staff: “I’m taking them or I’ll stab you both.”

Mr Cameron followed Bailey out while his colleague called the police and could then see he was holding a knife. Bailey again threatened him: “I’m going to get you I’m going to kill you”

No knife was found on him but one was recovered nearby on a traffic island outside Harold Wilson Court.

Jailed for robbery - Aaron Joseph Bailey, of Deighton

Mr Campbell said other offences committed by Bailey earlier last year included the theft of a charity box containing around £50 from Bagel Nash in Kingsgate on March 22. He was recognised from CCTV footage.

On May 18 a 16-year-old girl on her way to school saw him staring at her as she walked along a snicket. They passed each other but she heard him drop something and turned to look. She saw him picking up a lighter and he then called to her asking to borrow her phone.

Mr Campbell said the girl was fearful and told him she did not have one on her because she did not take it to school. He grabbed her pockets with both hands and began to search her as she stood crying but before he could steal anything he suddenly stopped and spat in her face.

Bailey was traced through DNA from the spit but by not for some time before he had already been remanded in custody for the robbery.

READ MORE: Man punched in the face following road rage attack on Halifax Road in Dewsbury

READ MORE: David Wagner: I love sport but don't talk to me about rugby or cricket says Huddersfield Town boss

Finally in the early hours of May 19 after police received a report of a man with a knife, he was arrested in Cloth Hall Street having thrown the six inch kitchen knife away as officers confronted him.

Mark Brookes representing Bailey said he realised the only sentence would be custody. He was someone who had suffered from mental health problems in the past.

Bailey, 28 formerly of Keldregate, admitted theft, having a bladed article, attempted robbery and carrying an offensive weapon. He was found guilty by a jury on the robbery charge at Costa Coffee.

Jailing him Judge Penelope Belcher said the attempted robbery was an unpleasant offence which had left his victim extremely shaken and afraid to go out alone.

He also had five previous convictions involving blades or knives which aggravated the other offences involving knives.

Costa Coffee, Leeds Road, Huddersfield