A man has been jailed for two years for attempting to rob a bakery with an imitation cowboy gun.

James Halliday showed the fake firearm to the woman working in the shop while demanding: “I want your till,” Bradford Crown Court heard today.

Prosecutor Paul Nicholson said the “brave and stoic” victim at first thought Halliday was joking.

She had greeted him with “Hi lovey what can I get you?” but realised he was serious when he said: “I’ve got a gun.”

Bradford-born Halliday, 35, pleaded guilty to attempting to rob West Vale Bakery in Greetland, Halifax, on the morning of March 16.

His not guilty plea to having a replica Colt revolver with intent to commit a robbery was accepted by the Crown because he was sentenced on the full facts.

The case was heard on a video link to Leeds Prison and using the Skype service.

Mr Nicholson said the bakery was a family business and the woman and her husband were there early that day.

Halliday, of Saddleworth Road, Greetland, fled from the shop after the woman called out to her husband for assistance.

He was spotted by a police officer on Saddleworth Road and arrested after taking a bus to Huddersfield Road.

The following day the police searched Halliday’s home and found the imitation gun un-der his bed.

He told them he inherited it from his late father who used to dress up as a cowboy.

Halliday’s barrister, Shufqat Khan, said he had no relevant previous convictions.

The incident had lasted less than a minute and he had run off as soon as the woman called for her husband.

The offence was wholly out of character for a man who had been in work since he left school.

Mr Khan said Halliday was a cannabis user but had begun taking heroin about eighteen months ago and become addicted.

He spent all his money on the drug, lost his job and borrowed cash from friends.

His addiction spiralled out of control and he was withdrawing from the drug after a sleepless night.

“His judgement was clouded by his craving for drugs,” Mr Khan said.

He told the police: “I’m sorry. I’m full of remorse. I didn’t mean to cause harm. I just needed my next fix.”

He said he wanted to sit down with couple to apologise in person.

Halliday had been in prison on remand since the offence. It was his first taste of custody and he was using his time to wean himself off drugs.

Judge Jonathan Rose said Halliday’s case was “too typical a story” of a cannabis user turning to Class A drugs and becoming a desperate addict.

He praised the bakery worker for her courage.

“She is a brave and stoic lady. Others would have been utterly terrified,” he said.