Plaintiffs celebrated the 2014 decision in Vergara v. California as a civil rights victory. (Damian Dovarganes/AP)

A California appeals court on Thursday upheld the state’s laws regarding teacher tenure, dismissal and layoffs, handing a major victory to teachers unions.

The ruling overturns a lower court’s 2014 decision that found after a 10-week trial that job-protection statutes for teachers had created illegal inequalities: Poor and minority children were more likely to be saddled with ineffective teachers who were difficult to fire.

The plaintiffs in the case presented a new civil rights argument against teacher tenure laws, and when it was successful, it was widely expected to be the first of many similar legal challenges in other states. One such suit is pending in New York, and another was filed this week in Minnesota.

The California appeals court agreed that “deplorable staffing decisions” have harmed poor and minority children in California’s public schools. But those decisions were the fault of school system administrators and not the result of the laws themselves, a three-judge panel of the appeals court found.

“The court’s job is merely to determine whether the statutes are constitutional, not if they are ‘a good idea,’ ” the court said in its opinion. “The evidence did not show that the challenged statutes inevitably cause this impact.”

The nine plaintiffs in the case, Vergara v. California, are public-school students backed by Students Matter, an advocacy group. They immediately pledged to appeal the ruling to the Supreme Court of California.

“We came to court to defend the rights of California’s public school students and will continue to do so, despite today’s temporary setback,” Theodore J. Boutrous Jr., a lawyer representing the plaintiffs, said in a statement. “The Court of Appeal’s decision mistakenly blames local school districts for the egregious constitutional violations students are suffering each and every day, but the mountain of evidence we put on at trial proved — beyond any reasonable dispute — that the irrational, arbitrary, and abominable laws at issue in this case shackle school districts and impose severe and irreparable harm on students.”

Unions have described the lawsuit as part of a broader attack on organized labor. Lily Eskelsen García, president of the National Education Association, the largest teachers union in the country, hailed the appeals court decision as a “win for our educators, our schools and most importantly, our students.”

“Ensuring that every student gets a good education is a critical goal but one that can’t be solved with stripping our teachers of their rights,” she said.

Randi Weingarten, president of the American Federation of Teachers, said that attacking teachers in the courts does not help attract new talent to the profession.

“It is vitally important that every single child, particularly the kids who brought this case, receive a great public education,” Weingarten said. “That starts with recruiting, retaining and supporting teachers, not blaming educators for societal problems or stripping away their voice.”