Child Youth and Family (CYF) threatened to take four children off a couple after they went to court to force the agency to help them.
And a Masterton Family Court judge has accused CYF of wanting to "wipe their hands" of the children in a bid to save money.
The siblings' great aunt and uncle took custody of the children - two of whom have disabilities - in January last year after previous placements fell through.
In October, the couple's lawyer spoke to the agency about formalising the custody arrangement but it was reluctant to discuss the case.
Three months later, the couple went to court effectively asking a judge to award custody to CYF.
This would allow the couple to receive more financial assistance to care for the siblings than they could get if they had to rely on help from WINZ and other agencies.
"Child Youth and Family pays a clothing allowance, they ensure setup costs are met - or they're supposed to - bedding, beds and basic furniture for children, lawyer Belinda Inglis, who acted for the children, said.
"They meet extra costs such as medical and dental costs and respite care."
The agency had argued that because the children had moved out of the family home, there were no longer care and protection issues so its involvement was no longer required.
In his decision, Judge Pat Grace was highly critical of the agency's conduct, saying its opposition was "fiscally driven".
"The caregivers did not appear to be seeking extensive intervention by the ministry. They clearly were seeking to have somebody to whom they could refer to, and somebody who could organise assistance for them from time to time (i.e. respite care).
"The [agency's] approach is that the caregivers should get on with it and that they can organise these matters through the health service and/or education department," he said.
He said it was a "concern" that, at the start of the court case, CYFs had inferred they may consider removing the children from the couple if the court ruled in the couple's favour.
"Whether this is a serious suggestion I do not know, but it is a concern that such an inference was made. We are talking about the protection of children."
And he said the agency needed a "reality check" after it argued the court did not need to intervene because the parents had not caused their childrens' disabilities.
"The reality however is that these children do have these disabilities. These disabilities do impact on two of the children on a daily basis.
"In my view it is wrong in principle for the department to take the approach that they can wipe their hands of the responsibility for the children because the difficulties the children face, although real and serious, were not caused by parents' behaviour towards the children."
Ms Inglis said there was an extensive history of concerns about the children's welfare, as well as ineffective intervention by the agency, and yet the agency was defending this proceeding on the basis that there were no care and protection issues," she said.
Judge Grace said the children were in need of care and protection and ordered the ministry to formulate a plan for the children's care by 15 February.
However, the agency has already missed that deadline and has been told it must file the plan by Monday.
CYF acknowledges it could have done better
CYF said it shared Judge Grace's frustrations over its handling of the case.
In a statement, CYF deputy chief executive Murray Edridge said he was disappointed that they had not met the standards that court, lawyers, caregivers and young people had the right to expect.
"I acknowledge that we should have handled this case better in focusing on what needed to happen through the courts to look after the best interests of the children."
Mr Edridge said the agency had started talking with the parties about how it would address the issues Judge Grace had raised.
And he said the judge's criticisms pointed to wider issues around CYF's performance in Wairarapa, particularly around the Family Court.
He said CYF was "taking significant steps to ensure a substantial improvement in our performance in the Wairarapa".
Masterton mayor Lynn Patterson told Morning Report a "critical shortage" of social workers in Wairarapa was behind CYF's poor service in the region.
"We don't have enough social workers on the ground here and that places huge pressure on social workers that are here. They just can't handle the case load." - Lynn Patterson