Campbell was in prison for aggravated robbery at the time of his offending, and had received his first strike for offences including robbery and receiving stolen goods.
The Sentencing and Parole Reform Act 2010 states that a full sentence without parole must be handed down for third strike offence, unless the court finds that to be "manifestly unjust".
The harshest penalty for Campbell would have been seven years' imprisonment without parole.
However, Justice Toogood said such a sentence would "be a grossly disproportionate outcome" and limit his chances of rehabilitation.
"Having considered all of these factors, particularly the nature of the offence and your prior offending; the early plea; your remorse and insight, and your rehabilitation prospects, I have no doubt that requiring you to serve a full sentence of seven years' imprisonment without parole would be a grossly disproportionate outcome.
"After you have served one third of the sentence, it will be a matter for the
Parole Board to determine whether and when it is safe to release you into the
community.
"You should be encouraged, Mr Campbell, to take part in those rehabilitation programmes."
In March 2013 Campbell received an intensive supervision and community detention sentence for receiving stolen property, possessing a knife in a public place, robbery and demanding to steal.
In 2014, he was sentenced to three years and four months' imprisonment for aggravated robbery.
In May, while in Waikeria Prison, he indecently assaulted a female guard by grabbing her buttock.
"A female Corrections officer was standing in a doorway supervising prisoners in the kit locker, where prisoners exchange their clothing, towels and bedding for fresh items," said the sentencing notes read by Justice Toogood.
"Standing behind the Corrections officer, you grabbed her right buttock, squeezed it quite hard, and held on for about 1 to 2 seconds."
The pre-sentence report said that Campbell had limited support in the community, having spent his life in foster care.
He had one brother who visited him in prison and hoped to rebuild ties with the rest of his family who he did not have a relationship with currently.
A victim impact statement prepared by his victim was also read by Justice Toogood.
"She said she felt angry, frustrated and totally degraded by the offending. She had been left feeling vulnerable and uneasy when performing her work duties.
"When speaking to the pre-sentence report writer recently, the victim stated that she hoped the Court would allow you the opportunity for parole as you are young and need help.
"She said you do not grasp appropriate relationship boundaries and she would like to see you offered assistance."
Campbell's own submission was "insightful" and showed "genuine remorse", said Justice Toogood.
Act MP David Seymour. who introduced the bill to change the law, said the law had been used correctly.
"This is exactly what the manifestly unjust clause was designed to do," he said. "While no one should go around groping women's bottoms, I think most people would agree that seven years' imprisonment without parole would be manifestly unjust."
He said this case proved to the law's critics that there were safeguards in place to stop offenders being imprisoned for long periods of time.
"Had he committed a much more serious crime such as a rape then absolutely he should have been given the seven years' non-parole straight away."
The three strikes law
• Introduced under Act's Sentencing and Parole Reform Act 2010.
• It is a three-stage regime of increasing penalties for repeat serious violent offenders.
• There are 40 qualifying offences - including all major violent and sexual offences with penalties of seven-plus years jail.
• First strikes are issued to an offender aged 18-plus with no previous record.
• Second strikes are given as a final warning.
• On the third strikes, courts must order the full sentence without parole - unless decided it would be manifestly unjust.