Lawyers for a mentally ill, incarcerated Wellington man took his case to the Supreme Court on Tuesday, arguing for his release.
Daniel Clinton Fitzgerald has been locked up in Rimutaka Prison for four years after he was sentenced to seven years for indecently assaulting a woman on Cuba St in 2016.
It was his third such offence, so under New Zealand's three-strikes law, he received the maximum penalty despite his long-standing mental illness.
"Mr Fitzgerald has had treatment-resistant schizophrenia since the age of 15 - he is now in his 40s," lawyer Douglas Ewen said on Tuesday.
The High Court sentencing judge agreed the offending was at the "lower end of seriousness", but said he had no choice about the length of the sentence, because of the three-strikes law.
Fitzgerald's lawyers argued a discharge without conviction was an option.
The Crown agreed the sentence is disproportionate, but Crown lawyer Madeleine Laracy said his circumstances could never have been contemplated by lawmakers.
"The sentencing court should not be able to ameliorate the effect of that by imposing a lesser lead sentence."
His lawyers on Tuesday asked the Supreme Court for his release.
"Ultimately what we're seeking is Mr Fitzgerald be discharged without conviction," lawyer Kevin Preston said.
The Government has vowed to repeal the three-strikes law, introduced by the previous National government over 10 years ago.
"We thought that some of the outcomes were unjust, so that's something we hope to get done in this three-year term," Justice Minister Kris Faafoi said.
The Supreme Court has reserved its decision about Fitzgerald until later this year.