Despite his research, Jordan Heslin, 22, was unable to make a quick enough getaway and was nabbed by police.
The bungling burglar had paced the street outside the Lloyds TSB in Stanley, County Durham, before finally entering with a scarf partially covering his face.
He then handed a note to the staff asking for thousands of pounds, claiming to have a gun and even apologising for doing so.
But when the scared member of staff handed the money over, the automatic doors failed to open and Heslin was trapped inside!
He was forced to return to the desk to ask: "Can one of you let us out?" still clutching the £2,140.
Heslin, from New Kyo, near Stanley, was arrested at a friend's house in Gateshead the following day.
Peter Walsh, defending, told Durham Crown Court: "Even the manager who was present said she felt: 'What a stupid lad. What have you done?'".
Judge Neil Clark told Jordan that despite the staff being frightened, they had never really believed that he had a gun.
By Catherine Richardson
Got an iPad or iPhone? Reveal Mag is specially designed to fit!