"We all make mistakes the question is how big is the mistake? In this case each of you had sex with a young person. All of you are young men and most of that is human nature," he said.
"The female young persons all seem to be robust Kiwi girls who are generous in their attitudes towards you. No one was forced into a position or made vulnerable."
Sighs of relief echoed around the court, where families had crammed the seats and spread to sit cross-legged on the floor, in support. One woman began to sob. A man shouted "thank you".
It was the solution the boys' families wanted, and what the girls said they wanted too. One read a statement to the court, saying she never wanted to be classed as a victim, and she did not want the man accused of her statutory rape to be punished.
"The police have not listened to me or how I felt.
"There was never anything disgusting about us being together. I don't know why our relationship was so interesting to the teacher," she said.
"I feel like we are being used by police to make a point."
THE CASE hit the news in September. At that stage, police were still talking to victims, but someone tipped off the media. They alleged there was predatory behaviour happening in Opotiki similar to the Roastbusters case - where young men in West Auckland had got girls drunk, had sex with them and posted footage to the internet, but were let off with warnings.
The tip sparked enough interest that a television reporter arrived in Opotiki to ask questions, in some cases approaching families before they'd talked to police. Detectives released a national media statement, to quell rumours and encourage others to come forward.
It only served to intensify the focus. Guards were posted at the school. The community was divided. Some accused the boys of targeting young girls. Others blamed the victims for "causing drama" or shamed them as "sluts". Families were accused of poor parenting, or negligence. In a small town, everyone knew who was involved, despite the name suppressions.
Many in the community came to the belief the young men were only charged because of the Roastbusters case, where police had been slammed in a report by the watchdog Independent Police Conduct Authority for "letting down" victims just months before.
"Police are trying to make an example of some kids to make up for the balls-up they made with the Roastbusters," said long-time councillor Barry Howe.
"It sounded really bad when the police publicised it. But once it got to the nitty gritty, people realised that it's a load of bull****."
During sentencing on Thursday, lawyers raised similar concerns. They quoted some of the girls' mothers, who said the investigation was more harmful to their children than the initial offending.
Defence counsel David Bates said he thought the police needed to take a strong look at how they handled such cases.
"Whether it should or should not be prosecuted, that is the question."
EACH OF the five cases was slightly different. All of the men faced one count of unlawful sexual connection with a girl under 16, and one faced two counts. Some of the charges related to one-off hook-ups, such as the two girls who snuck out to meet the boys in their car. Both girls said they planned the sex - they'd met the boys not at school but through Facebook and Snapchat, and progressed to texting.
For others, such as the 15-year-old who did not want to be a victim, the sex occurred during a relationship. Once it was after a party, once at a friend's house and once after the school ball.
The last case involved digital penetration, not sexual intercourse, which the young man's lawyer said was "a testament to his character". "You couldn't ask much more from a 17-year-old boy, wanting more, she says no, they cuddle, they go to sleep."
In court, much was made of the young men's futures. During college they were the rugby stars, the leaders, the cool boys. One, said his lawyer, could end up being an All Blacks candidate. Others were at university or planned to apply for apprenticeships.
Their Facebook pages are full of hunting pictures and posts about rugby, and in some cases, images of boozy nights out. One, from the middle of last year, shows them at a club in Hamilton, drinks in hand, the comments on the post full of references to sex.
Given the incidents were so separate, questions were raised about the choice to treat the cases as one - though they were not in one prosecution, the cases were sentenced together.
Only the one victim impact statement was read in court. The judge also read out some summaries of the restorative justice conferences.
In some cases families were willing to "build bridges", he said, in others, the victims did not turn up for the "healing" process.
Sexual violence expert Nicola Gavey, an Auckland University psychology professor, said grouping the cases together possibly didn't allow for the nuances of each case to come through.
While she didn't necessarily support charges being laid in a case where the age gap was close and the girl was clear she consented, Professor Gavey said it would be wrong to write off the case as a failed prosecution - or to dismiss the influence the boys would have on their younger peers.
"We have drawn a line in the sand in recognition that there are issues around the younger people are, the more vulnerable they will be to coercion and pressure," she said.
"At one level it can be seen as too paternalistic, and at another too inclusive. But we do need a line."
Professor Gavey said, however, the case made it clear there needed to be a better way to deal with teenage sex issues that weren't so black and white.
"We need a way to respond if there is to a breach of ethics and exploitation and power imbalance, without necessarily always treating those responsible as sex criminals," she said.
"Saying it's human nature and it's all fine is not right, and neither is heavy-handed police treatment, or shaming and blaming girls."
Auckland barrister Phil Hamlin, a former Crown prosecutor and an expert in sex cases, said he believed the police and courts had acted appropriately, despite the criticism.
"It's sensible to seek a discharge without conviction," Mr Hamlin said.
"The boys have realised they made a mistake. A lot of boys do silly things, they don't think about what they're doing, or don't see themselves as doing anything wrong. But ignorance is not an excuse."
He said the law, while not perfect, was a good one.
"It's our society's protective arm circling the youngsters, protecting them from making rash decisions," he said.
"It's very difficult for everyone involved but what needs to happen is that the boys need to realise it's wrong."
Detective Inspector Mark Loper did not want to comment on the prosecution, or the comments made by the judge - who suggested the law or the sentencing approaches in underage cases may need review.
"This has been a very thorough and complex inquiry," Mr Loper said.
"I would particularly like to acknowledge the victims and their families who have worked closely with us throughout what has been a very challenging process for them."
THE EFFECT of the prosecution lingers in the town. Opotiki is small, just 8500 people. It's the kind of place where kids still walk to school, and there are horse paddocks sprinkled among residential streets.
It is poor, but not that poor, says mayor John Forbes, and it would be wrong to paint the issues as something linked to deprivation.
"If you go round the back streets with a television camera you could take some things that look dilapidated and rusty. But we have developers knocking on the door all the time," he said.
When the story broke, Mr Forbes was furious. The town has been working hard - kiwifruit is booming, as is manuka honey, and a new $52 million harbour development is well under way.
"And yet it's this kind of thing that gets the attention."
Mr Forbes says he's tried to stay out of the case, but knows it has been a tough time for many.
While he felt for those people, he didn't want to resile from comment.
"I'm disappointed that behaviour hasn't been what it should have been," he said.
He believes there should be a larger focus on core values taught by parents and schools.
"We've got to make sure our kids are learning about empathy and relationships and respect."
The Weekend Herald asked Opotiki College if, in the wake of the incident, it had brought in a new relationship programme, or more sex education.
Board chairman Fred Cookson said he thought the responsibility for the behaviour was the responsibility of the parents and guardians. However, if the school could assist to "enlighten, uplift and improve" behaviour, it was open to that.
He said the school was doing its best to cope with a difficult situation.
"The pressures these young ones face, with the impact of modern technology, is immense.
"It can all blow up so quickly," he said.
"It's like standing on a land mine and then it blows your legs off. But you didn't know it was there. It's such a vague and grey area. It's such a delicate, blurry line."