A bumbling gunman was caught on camera being duped by a teenage student who used an old distraction trick from the Carry On movies to escape.

Ruthless mugger Jason Dunne, 32, had been waving a pistol at the victim and said ’Do you want to be shot?’’ before demanding his mobile phone.

But the quick-thinking 18-year-old reacted by suddenly pointing the other way, and exclaimed: ”Wow what’s that over there?’’ – before he punched his distracted attacker in the face as he turned to look.

Crestfallen Dunne was then left reeling under the shock of the blow, while the undergraduate fled the scene – with his phone still in his pocket.

To add insult to his injured pride moments later Dunne was arrested after security staff at Manchester University filmed the entire episode on CCTV and alerted police.

The footage emerged today as Dunne was jailed for five years after he admitted attempted robbery and having an imitation firearm with intent to commit an indictable offence.

One police source said: ”It may have been the oldest tricks in the book but it certainly got the better of Dunne.

Video of 5-year Sentence for Gunman Detained by University Security Guards

”It may seem like the stuff of Carry On movies but it must have terrifying for the student. He had great presence of mind to come up with a trick like that to get away from a man waving a gun at him.”

A Greater Manchester Police spokesman said the bungled mugging occurred at 4am on November 29 last year after Dunne from Moss Side was seen riding his bicycle near to the university buildings on Oxford Road.

His actions raised suspicions of security staff that monitored his movements on CCTV.

Dunne was seen getting off his bike, crossing Oxford Road, approaching the 18-year-old student and pulling a handgun from his pocket.

As security guards called police and scrambled to the location, he demanded the victim hand over his mobile phone.

The victim fought back and during the struggle the victim ran off while Dunne was forced to retreat empty handed.

He was detained by security guards a short time later and subsequently arrested by police – the gun was found to be an imitation firearm.

Det Ch Insp Colin Larkin, said: “Dunne is a prolific and persistent offender who was in an area heavily populated with students in the early hours of the morning with the sole intention of committing a robbery.

“As the CCTV explicitly shows he was armed with a gun, a terrifying weapon that he used to threaten his victim.

“Security staff at the university saw events unfolding and saw that he was armed with a gun. Despite this they have bravely, and without consideration for their own safety, set out to detain this man which they did successfully.

“They could have had no idea that the gun was in fact an imitation and this makes their actions all the more impressive and worthy of recognition.

“I must also credit responding officers who were in the area within minutes and the investigation team who, working with the CPS, have ensured a dangerous criminal is off our streets.”

Story via Cavendish Press.