A lawyer representing an excluded boy had argued that the head- teacher's refusal to obey an appeal tribunal's ruling to reinstate him amounted to "nothing short of capitulation to unlawful union pressure".
Lord Justice Laws said threats of industrial action were "not merely a relevant consideration to be taken into account, but, in a reasonable world, a mandatory one".
He said: "In all events the head and the governors have to strike a balance between the interests of the reinstated pupil and those of the others."
Lords Justices Laws, Thorpe and Clarke had heard an appeal over two pupils, who could not be identified, banned from regular lessons after exclusion for violent behaviour.
The families of both pupils had lost High Court bids to have them fully reinstated, saying the governors were unlawfully refusing to comply fully with a statutory appeal panel hearing. Both appeals were dismissed.
Chris Keates, deputy general secretary of the National Association of Schoolmasters Union of Women Teachers, said the actions of independent panels undermined disciplinary structures in schools: "We think (the ruling) is quite significant - we currently have 12 ballots in place across the country for refusals to teach pupils who have been excluded for violent behaviour."