A man who left his provisional driving licence at the crime scene after robbing a Co-op has been jailed for six years.
Patrick Muddiman, 38, immediately punched a customer standing at the tills after entering the shop on High Street, Brampton, on 3 March just before 10pm.
He then threatened staff at the store and demanded cash, Cambridgeshire Police said.
He was handed around £120 in £5 and £10 notes and demanded a packet of cigarettes after staff told him £20 notes were kept elsewhere and they did not have access.
A customer restrained Muddiman but he managed to flee, punching the customer he had struck earlier for a second time, who also tried to help tackle him.
But Muddiman accidentally left a black wallet containing his provisional licence outside the shop and was later arrested by police.
He gave no comment in interviews but later admitted robbery and assault by beating.
Muddiman, of Whiteford Drive, Kettering, Northamptonshire, was sentenced at Peterborough Crown Court on Friday to six years in prison, with a further three years on licence.
The defendant has 24 previous convictions for 36 offences including theft, violence and robberies, police said.
The theft of the cash and damage to the shop amounted to between £400-500, but the Co-op also lost around £7,000 in business after closing for a day, the force added.
Read more from Sky News:
CCTV shows moment brave members of public tackled robber
Tennis star Nick Kyrgios ‘used Tesla app to help police catch robber’
Detective Constable Sarah Longbottom, who investigated the robbery, said: “This was an incredibly frightening incident for both customers and staff who were in the shop at the time and genuinely feared for their safety.
“I’d like to thank the brave shop customers who tried to help on the day – and was pleased to see the judge award the man who helped restrain Muddiman with a commendation.
“Muddiman was linked to the crime by shop CCTV and witnesses who identified him from his driving licence – a key part of evidence which he left behind.”