Three bungling raiders were caught when their bid to tow a cash machine to a getaway car ended in farce when the dispenser became jammed in a doorway.
The masked robbers burst into the post office in Gorton, Greater Manchester, and wedged open the front door with a breeze block as they tied a strap around the cash machine.
The strap was then attached to a stolen car parked outside, police said.
CCTV footage captured their blundered getaway bid as the machine was dragged against the door frame, where it became stuck.
This caused the wheels of the stolen black Vauxhall Astra to lock up outside Mount Road Post Office as the vehicle remained on its spot.
The three offenders fled the scene on foot but were all apprehended by officers shortly after, Manchester Crown Court heard.
Karl Warburton, 30, Wayne Horrocks, 20, and Mark Delahunt, 30, all of no fixed abode, pleaded guilty to attempted robbery on July 12 at an earlier hearing.
Detective Constable David Meeney said: “These three men had clearly planned this robbery in advance but what they did not think through was how difficult it is to dislodge a cash machine, or how relentlessly our officers would pursue them.
“Thanks to the rapid response of our officers, combined with their knowledge of the area and their sheer determination, we were able to lock up three dangerous men and secure so much evidence that they had no choice but to plead guilty to what they had done.”
Warburton and Horrocks were jailed on Wednesday for six years each, while Delahunt was imprisoned for four years.