The Employment Relations Authority has found fault with major job cuts at the Ministry of Education.
In a decision published on Thursday it ruled that under the terms of its collective agreement with the Public Service Association, the ministry should have worked more closely with the union on change proposals that led to decisions cutting about 600 jobs.
The authority also said the ministry should have considered the effect of its proposals on each employee individually, and could not make the union's members redundant without their agreement.
It is not clear what effect the ruling will have on the ministry's change decisions, but the union said it expected the ministry would have to consult with it again over its plans.
PSA assistant secretary Fleur Fitzsimons said the authority agreed with the PSA's interpretation of the collective agreement.
"This decision is a victory for dignity and fair treatment of people at work. The authority found the attempt to dismiss hundreds of workers by the ministry would have been unlawful," she said.
"The ministry should now reconsider its approach to matters including reopening voluntary redundancy and reducing its reliance on contractors."
The authority's decision said the collective agreement "requires the ministry to participate in a process with the PSA with the aim of reaching agreement as to recommendations to be made to management, but the recommendations do not need to be joint or agreed".
It said that did not happen.
The ruling said severance under the agreement was "an option that may be available to affected employees who have not been reconfirmed or reassigned, and as an option, it must be agreed".
It also said the agreement required the ministry and the PSA to reach agreement on the options for staff identified as surplus to requirements.
"Implementation of the options will be negotiated on a "case by case basis", meaning on an individual "employee by employee" basis," the decision said.
Labour's education spokesperson Jan Tinetti said livelihoods had been left in limbo, and the government should listen in good faith and ensure essential workers were not cut from the education system.
"The findings by the Employment Relations Authority demonstrate that the government was moving too far too fast in its pursuit of putting people out of work to pay for unecessary tax cuts," she said.
The Ministry of Education said it would keep its staff updated on the next steps.
"We need to consider the decision and its implications. We have agreed that we will meet with the PSA once both parties have had a chance to properly understand the decision and next steps," a ministry spokesperson said.