The justice system is often criticised for giving lenient sentences to paedophiles.

But how the court deals with child abusers depends on two things: the seriousness of the offence and a paedophile’s capacity and willingness to change.

There are often borderline cases where sex offenders can either be dealt with by a prison sentence or treated in the community.

One such case emerged last week when a long-serving Hampstead teacher was convicted of sexual activity with a child.

He had been facing up to two years’ jail, but in what Judge Donne QC called an “exceptional case”, the teacher was handed a three-year community order.

Judge Donne ruled the paedophile teacher would receive the most effective treatment and would be less likely to reoffend if kept within the community.

Clinical director of the Portman Clinic in Hampstead, Stanley Ruszczynski, calls it a “reflective capacity”, or a desire to delve and uncover the root cause of their offending and reconcile their behaviour with what is acceptable.

“Clinically we want to have evidence that a person is interested in thinking about their offence and why they committed it,” said Mr Ruszczynski.

“It’s about them finding a part in themselves which is curious, concerned or worried about why they did this.”

There are no quick fixes in the treatment of paedophiles, claims Mr Ruszczynski, only a long road to recovery.

He said: “The paedophile arouses or causes fear, pain, confusion and disturbance in the victim in an unconscious attempt to rid himself of these unbearable emotional states.

“Sexual offences are always violent offences, it’s nothing to do with sex. Their capacity for thought is flawed.”

The clinic works with paedophiles individually and in groups.

The group work is sometimes more effective because it is “more difficult to pull the wool over the eyes” of fellow sex offenders and progress is measured in a “degree of regret, sadness or concern” shown.

A report by the prisons and probation inspectorates found that some sex offenders were being released from jail without proper treatment to prevent reoffending.

The Stop it Now campaign, which works to protect children from sexual abuse, supported the treatment of paedophiles in the community if it helped to reduce the rate of reoffending.

A spokeswoman said: “Treatment is better than no treatment. The priority must be to reduce the risk of reoffending and if that’s in the community then that would be a better option. Prison has never really worked as a deterrent.”

The Sentencing Council, which issues guidelines to courts across the country, is in the process of reviewing the Sexual Offences Act, introduced eight years ago.