The principal Youth Court judge is asking school boards of trustees to try to keep every child actively involved in education, before resorting to expelling or excluding troubled students.
Speaking at a board of trustees (BOT) conference over the weekend, Judge Andrew Becroft called for BOTs to think very carefully about the effects of the expulsion and exclusion of students.
"We know that about 35 per cent, we think, of young offenders before the youth court aren't at school - the research is clear that better than psychological intervention, better than counselling, better than most things is attendance at school," he told Radio New Zealand.
Participation and being engaged was a huge protective factor, he said.
He acknowledged that schools are now much better than they were 10 years ago.
"I think in the last 10 years, to be fair, there's been something of a sea change in the attitude within the whole education system, and schools are fighting really, really hard to retain people. I think that's a big improvement."
It is better to keep troubled children in mainstream schooling rather than moving them to alternative education, he said.
"So many schools say to me we are up to that challenge, we will take those tough students, but at the moment we don't have enough resources.
"On the other hand, the Ministry of Education says 'judge every school has got the resources but if they balance their budget, if they rationalise their spending it could cope'."
He did not know what the answer was, but he knew that schools were up for the challenge.
However, schools probably need more help than they have at the moment.
"Somehow we have to be providing more to those four or five thousand really tough kids, who at the moment are lost in the system."