A High Court judge has reserved his decision in a case that could affect hundreds of people kept in jail for longer than they should have been.
The case stems from the Department of Corrections failing to properly take into account the time offenders spent in custody on remand before their trial when determining their final release date.
Today's hearing concerned two of those ex-prisoners: Michael Marino and Shane Gardiner.
They are seeking damages of $60,000 for unlawful and arbitrary detention.
Legal debate today focused on Mr Marino.
He had taken his battle all the way to the Supreme Court, after being jailed for 22 months on domestic violence and other charges.
He argued he suffered false imprisonment, which caused shock, distress and humiliation, due to being held in prison for nearly four months longer than he should have been.
In its ruling, the Supreme Court awarded him legal costs of $30,000.
But his ability to take his substantive case further became bogged down today in legal argument in the High Court.
Much of that argument focused on what that Supreme Court judgement really meant.
Arguing for the Department of Corrections, lawyer Daniel Perkins said the Supreme Court ruling was silent on whether it gave a lower court the prospective right to issue a judgement of civil liability over the Marino and Gardiner case.
That raised a question mark over the liability the department faced over the men's detention, as it raised doubts over the right of a lower court to make judgements on a matter already dealt with by a higher court.
Mr Perkins said the original case was an application for habeas corpus and traditionally these were dealt with simply and expeditiously.
They were deliberately not clouded with complicating factors, such as prospective rights conferred on lower courts by a higher court decision.
Mr Perkins added bad advice from defence counsel during the original trial was responsible for this problem in the first place.
The counsel for Mr Marino and Mr Gardiner, Douglas Ewen, rejected that.
He also rejected the suggestion that the Supreme Court did not confer prospective rights onto a lower court.
Mr Ewen said the court must have had one eye on the question of liability for unlawful detention when it made its ruling - to suggest otherwise defied credibility.
The case could have wide implications, with Corrections Minister Judith Collins commenting last month that thousands of prisoners could potentially be affected by the release date error.
Prime Minister John Key said at the time that whether compensation would be considered for affected inmates was uncertain and Parliament could pass retrospective legislation to rule out payments.
Justice Simon France reserved his decision.