A robber who left his provisional driving licence at the crime scene has been jailed for six years.
Patrick Muddiman, 38, threatened staff at the Co-op shop in High Street, Brampton, and demanded cash on March 3, Cambridgeshire Police said.
He was handed about £120 in £5 and £10 notes and also demanded a packet of cigarettes after staff told him £20 notes were kept elsewhere and they did not have access.
A customer restrained Muddiman, of Whiteford Drive, Kettering, Northamptonshire, but he managed to flee, punching a second customer who tried to help with the restraint.
Muddiman accidentally left a black wallet, containing his provisional driving licence, outside the shop and he was later arrested by police.
Muddiman was sentenced at Peterborough Crown Court on Friday to six years in prison, with a further three years on licence, police said.
The defendant has 24 previous convictions for 36 offences including theft, violence and other robberies, the force added.
The theft of the cash and damage to the shop amounted to between £400-500 but the Co-op also lost about £7,000 in business after closing for a day, police said.
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.
“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.”