A senior judge concluded there was a 'realistic prospect of rehabilitation'