Masquerading as a child online should become a criminal offence to help snare predators and deter vigilante paedophile hunters, an inquiry has heard.

Former police chief Jim Gamble said the law should be changed so only those with police permission or reasonable excuse could pose as an under-18 on the internet.

Appearing before the Independent Inquiry into Child Sexual Abuse (IICSA), he said the crude methods used by have-a-go detectives should be taught to a “citizen’s army” of volunteers under police guidance.

The IICSA is currently holding public evidence hearings examining how the internet can facilitate sexual abuse of children.

Police have previously expressed concern that groups such as Dark Justice or The Hunted One, which pretend to be children online to catch sex offenders, put investigations at risk.

Mr Gamble was head of the Child Exploitation and Online Protection Centre (Ceop) until he quit in 2010 over its impending merger with the National Crime Agency (NCA).

His suggested changes to the law would see those that knowingly talk to a child online while pretending to be a similar age face charges.

He told the hearing: “Number one, it inhibits people from masquerading online – and everyone doesn’t masquerade, some lie about their age to a slight degree, some more so – what it would do, with a single swipe of the pen or legislative instrument is inhibit or prohibit vigilante activity because you could not masquerade as if (you were) below the age of 18 if you did not have lawful authority or reasonable excuse.

“Lawful authority would come from the police, reasonable excuse might be a parent who is worried about their child and decides to take on their child’s persona to look at that.

“That’s about a sensible and pragmatic approach to creating an architecture through legislation that makes it easier to prosecute people because so much of the legislation relies on intent.

“Why would I, as a 58-year-old man, want to pretend to be 16 to talk to a 13-year-old girl?”

Mr Gamble earlier told the inquiry that he was “fundamentally opposed” to vigilantism, but the techniques used by online hunters could be mirrored by professionals.

This would involve carefully vetting citizen volunteers and training them up.

He continued: “We know from the vigilante experience that you don’t need to be a rocket scientist to carry out some of the low-level work that captures a lot of the low-hanging fruit.”

“The police resist this and I don’t know why.

“Begin thinking about better ways that we can build a citizen’s army that creates a much greater likelihood of someone talking to your 13-year-old daughter, actually talking to a 30-year-old volunteer digital detective.

“I cannot, for the life of me, understand why that concept has not been embraced.”

The inquiry will continue holding hearings until the end of the week.