It was not Steven Ryan's lucky day when he decided to carry out an armed robbery on a jeweller's to pay off a drug debt.
After panicking in the shop, the 34-year-old addict made off with £50,000 worth of jewellery on a bike with faulty gears.
But he then had the misfortune to encounter a curate who was a former tough Royal Marine and also a martial arts expert.
They gave chase with another man and - despite brandishing a replica Magnum gun at them - Ryan was pounced on and ended up in hospital with a punctured lung.
Now Ryan, of Vine Court Road, Sevenoaks, has been jailed for nine years after admitting robbery and possessing a firearm.
A judge was so impressed with the "conspicuous gallantry" of have-a-go heroes Mark Oden, James Bampton and Robin Canty that he awarded them £250 each out of public funds.
Prosecutor Richard Cherrill said: "This is the story of an audacious robbery that was happily brought to nothing because of the heroism - and I don't exaggerate - of members of the public who pursued and detained the defendant, notwithstanding they were under threat from what appeared to be a substantial and real weapon."
Maidstone Crown Court heard Michael Whitcombe Jewellers in Sevenoaks High Street was about to close on March 3 when Ryan entered wearing a hoodie, sunglasses and odd trainers.
Prosecutor Richard Cherrill said Ryan shouted at staff, telling them to get down. He then pulled a "fearsome" Crosman .177 air pistol loaded with 10 pellets and a hammer from a rucksack.
He threatened owner Chloe Whitcombe and staff Janet Snook and Avril King, demanding "all the expensive gold".
Ryan went outside and smashed a window with the hammer before forcing his way back in. At one stage he dropped the gun and the handle fell off. He filled a bag with jewellery and made his getaway.
"He was thwarted in that mission by a number of incredibly brave members of the public," said Mr Cherrill. "To the misfortune of the defendant Mark Oden is both a curate and a former member of the Royal Marines.
"To the misfortune of the defendant Mark Oden is both a curate and a former member of the Royal Marines..." - Richard Cherrill, prosecuting
"James Bampton, again to the misfortune of the defendant, has martial arts experience - jiu-jitsu - which came in useful when he was apprehended."
Together with Mr Canty, they cornered Ryan in an alleyway, where he pointed the gun at them. He tried to escape on his bike but was taken to the ground.
"Mr Bampton told him in very round terms if he didn't behave himself he would break his something arm," said Mr Cherrill.
When arrested, Ryan said: "This ain't my thing. It ain't what I normally do."
Mr Cherrill said the effect on the victims had been significant and the owner was considering closing the business.
Charlotte O'Connor, defending, said of Mr Bampton: "He was slightly overzealous. He jumped on top of Mr Ryan and started to hit and kick him. He was in hospital for three days and operated on for a punctured lung."
Judge Martin Joy sits at Maidstone Crown Court
Judge Martin Joy told Ryan, said to have problems with drugs, drink and gambling: "I have seen photographs of the gun. It looks like a Magnum. It is undoubtedly the sort of gun that would terrify in an armed robbery.
"I have no doubt at all when you decided to commit this robbery you knew what you were doing. It is not suggested there can be anything other than a substantial custodial sentence.
"The weapon was real and it was loaded. You didn't care whether or not it was loaded. In my judgement, there are exceptionally serious aggravating features in this case.
"When there is a combination of drugs and guns it is a lethal and sinister combination and must be stamped out."