Darren Lee-Smith, defending, said the custody threshold had been crossed but said the sentence could be suspended.

He told the court: “If released at the half way point [from a jail sentence], he would not have the longer term monitoring offered by the probation service to address his thinking skills which were quite clearly in deficit on the day of the offence.”

However Judge Simon Newell said: “The probation service can only do the work if people are prepared to change. There has to be an immediate custodial sentence.”