A thief met his waterloo after he stole a phone from a shop but was unable to escape because the door refused to open.
Shop owner Afzal Adam, 52, used a gizmo installed behind the counter to lock the entrance after becoming suspicious of the thief's motives.
In a video shared online, the thief is seen at the counter, showing interest in the phones on sale.
When he finally got the phone he wanted, he turned on his heels and ran towards the door.
However, the door wouldn't open.
Seeing no other means of escape, he returned the phone before the door was opened to let him out.
The shop owner at Phone Market in Dewsbury, West Yorks, England, said he let the thief go because he feared he could get violent
Afzal said: "With people wearing masks and balaclavas, I was worried about not being able to identify anyone if they did steal from my store.
"He’d have gotten away with £1,600 of merchandise, so the mechanism has paid for itself!
"After I had the owner of another local store come in and ask what mechanism we had as they wanted the same."
He added: "99.99% of the comments have been saying well done and commending our forgiveness.
"Some people have been asking 'Why didn't you beat him up?', but we would never do that.
"I hope I have showed people what humanity is - there's more to the story than this and if we had acted out it would just have been another story of violence."