Principals are demanding the Ministry of Education do more to support schools who are forced to enrol violent and dysfunctional pupils.
Currently, if a child is excluded or expelled from one school, the Ministry can direct another to take them on.
But principals said that was a problem if there was no good support in place - and they commissioned a legal opinion to back them up.
The Principals' Federation released that legal opinion today.
The review, by Quigg Partners, said: "A school should never be put in a position by virtue of a direction which results in the school being prevented from carrying out its primary obligations."
"When a school finds itself in such a position, we consider that the school would have strong grounds to have the direction judicially reviewed."
The federation's president Perry Rush said it was clearly on their side.
"I think this is really a watershed legal opinion, because it does make it very clear that if a young person is required to be enrolled in your school that they must come with appropriate resourcing relative to the degree of behaviour that has been seen in the past," he said.
By this, he meant the pupil should have a risk management plan so teachers knew what to do when problems arise.
He did not want this to end up before a judge or jury.
"We're very keen not to get to any court challenge. The power of this legal opinion is for the Ministry and the ministers to be able to say, we want to keep every young person in school, we don't want exclusions, let's make sure the system serves really complex young people that are at risk."
But some parents told RNZ they found this educational policy battle hard while trying to get their children back into school after being expelled.
One mother, who RNZ has agreed not to name, said it was "degrading" for the child and "a constant [and] complete rejection".
"I have one child that can't go to school that wants to go to school and can't partake in anything and is getting more and more depressed and more and more upset each and every day, because he's not getting the opportunities that the other children are."
The Associate Minister of Education Jan Tinetti, who is responsible for learning support, said she "really feels for students and teachers in this position."
She said the budget announced last week invested $17 million for intensive wraparound support for pupils in these kinds of situations.
Children's Commissioner Judge Andrew Becroft said he would comment on the legal opinion.
"Frankly I shouldn't and indeed I won't get involved in a legal dispute between the principals and the Ministry of Education and I guess I'd be sad with that's how it is resolved, but it won't be for me to be commenting on that."
But he said in most cases he believed keeping children in mainstream classes would be the better option.
"That's better for the children, they'll thrive, it's better for the other children, they'll learn empathy and kindness, it's better for the community. And in that way, I guess it's a complete rejection of the old fashioned model that was so last century when we separated children from [the] mainstream."
In a statement, Ministry of Education deputy secretary Katrina Casey said the use of power to direct schools to take pupils "is a very last resort and one that is used very rarely".
It had received the legal advice from the principals' federation and was considering it.
It expected to update schools on its view in July.