A complaint that the Government has breached prisoners' rights will be taken to the United Nations.
The case taken by Wellington human rights lawyer Tony Ellis alleges that legislation on prisoners' rights breaches a UN convention against torture and mistreatment of prisoners which New Zealand has signed.
The complaint concerns prisoners kept in jail past their official release date because of bureaucratic error.
Legislation passed in 2005, which becomes permanent next month, allows mistreated prisoners to get compensation only after victims of crime and the legal aid system get a share of the money
Mr Ellis says prisoners who are unlawfully detained deserve compensation which the Government should not retrospectively diminish.
"I've never seen something quite so strong as a government bringing in domestic legislation that reneges on a major international treaty."
Minister of Courts Chester Borrows says the overdue release of inmates from jail stems from mistakes such numbers in dates transposed in handwritten material from court officials.
About 50 of New Zealand's 8000 inmates have been affected by this, but Mr Borrows says that is still too many, and from later this year an electronic system will be used so judges will type in dates and they will not need to be transcribed by a court officer.