An automatic payment error has resulted in almost 90,000 beneficiaries being underpaid or overpaid, with the mistake totalling millions of dollars.
The error at the Ministry of Social Development dates back to 1993 and has resulted in thousands of people being given incorrect accommodation supplement payments across 21 years.
Initial analysis shows just over 41,000 people have been underpaid a total of $23 million, and just under 46,000 people have overpayments of around $32m.
The mistake was discovered in September 2014 and was fixed a few months later, though Social Development Minister Anne Tolley was informed only in March this year.
Ministry of Social Development deputy chief executive Ruth Bound said the vast majority of underpayments were of less than $1000.
"Work is underway right now to work through options to address the error and do the right thing by people who have been underpaid," she said.
Approximately 800 of the 286,000 clients currently receiving the Accommodation Supplement were affected, Ms Bound said.
She said the error was made by staff in 1993, who did not have the appropriate system controls and put in the wrong code.
Ms Tolley said she had been advised the government would have to reimburse those who were underpaid, and would not be seeking to get money back from people who were overpaid.
"My attention now is on how we're going to fix this and how we're going to make sure that the practice matches the law.
"That's the objective of the whole exercise, and we can only apologise to people who've been underpaid."
Mrs Tolley said a review has found more than 30 other examples where the Social Development Ministry was not complying with the law - six of which could require reimbursements.
Ms Tolley said she had received a formal apology from the ministry's chief executive for the 18-month delay in alerting her to the underpayments.
Earlier, she said she was waiting for more information about the problem.
"I've had initial advice on this, but I'm awaiting further advice around the total number of people affected, the total amounts involved, and the best way to deal with any reimbursements.
"Hopefully by October of this year we will have addresssed the majority of the issues that they've identified today."
She said MSD used a very complicated system.
"Thirty thousand transactions in a day, eight million a year, they're going to get some of them wrong."
Labour Party social development spokesperson Carmel Sepuloni said it was concerning that Ms Tolley was told about the problem so late.
"This is a huge issue - there are potentially 87,000 people affected, if not more - so the minister should have been informed straight away," she said.
"[But] the minister did know since March this year and is still saying that she needs to get figures and numbers.
"Well actually, two months she's known, she should have been able to get those figures already."
Ms Sepuloni said it was important people who had been underpaid were reimbursed.
"These are the people who are experiencing the greatest level of hardship so every dollar does matter," she said.
Ms Sepuloni said there needed to be an investigation to make sure there were not similar problems where people were underpaid.
The ministry said it would report back to ministers in June on proposals to address the error.
It said it would also supply ministers with advice on reimbursing clients who had been underpaid, which would then go to Cabinet.