Teachers union officials denounced a ruling Tuesday by a Los Angeles County Superior Court judge deeming job protections for teachers in California as unconstitutional as a misguided attack on teachers and students.

The ruling represents a major loss for the unions and a groundbreaking win by attorneys who argued that state laws governing teacher layoffs, tenure and dismissals harm students by making them more likely to suffer from grossly ineffective instruction.

If the preliminary ruling becomes final and is upheld, the effect will be sweeping across California and possibly the nation.

Judge Rolf M. Treu ruled, in effect, that it was too easy for teachers to gain strong job protections and too difficult to dismiss those who performed poorly in the classroom. If the ruling stands, California will have to craft new rules for hiring and firing teachers.

"This decision today is an attack on teachers, which is a socially acceptable way to attack children,” said Alex Caputo-Pearl, the president-elect of the Los Angeles teachers union. Instead of providing for smaller classes or more counselors, “you attack teacher and student rights.”

“There are real problems in our schools and what this continues to do is promote an anti-teacher narrative,” he said. “We are not blind that there are teachers who struggle … but efforts to support our colleagues have not been supported by the state.”

Attorneys representing the plaintiffs commended the ruling.

“It’s a terrific, wonderful day for California students and for the California education system,” said Theodore J. Boutrous Jr., an attorney for the plaintiffs. “These laws are hurting students and hurting teachers. They make no sense. They are damaging in every respect."

Boutrous said an ideal system would be one in which highly effective teachers were rewarded for their success, like other professions. Administrators should be able to manage the work their teachers do and encourage top performers.

“If someone is grossly ineffective and not doing their job, then get rid of them,” said Boutrous, a partner at Gibson, Dunn & Crutcher, who represented activists who sought to overturn California's ban on gay marriage.

The attorneys representing the state and the California Teachers Assn. failed to demonstrate evidence of positive outcome from the statutes, Boutrous said. Their arguments “fell completely flat,” he said.

Los Angeles schools chief John Deasy said he was pleased with the decision, which he said will allow more common sense rules and allow districts to root out ineffective teachers who hurt the education of students.

“It sends a powerful message that our educational system must change,” he said. “Every day that these laws remain in effect represent an opportunity denied.”

Deasy said that the existing laws saddle students with ineffective teachers without realistic recourse.

“Nothing we do in our schools is more important to the education of the child than the quality of his or her teacher,” Deasy said, adding that he looks forward to helping to craft new laws.

United States Secretary of Education Arne Duncan said the decision gives California the opportunity to build a new framework for the teaching profession that protects both the rights of teachers and students.

“The students who brought this lawsuit are, unfortunately, just nine out of millions of young people in America who are disadvantaged by laws, practices and systems that fail to identify and support our best teachers and match them with our neediest students. Today’s court decision is a mandate to fix these problems.”

American Federation of Teachers President Randi Weingarten said that while the decision was not unexpected, the judge lacked a thorough, reasoned opinion of the issues at hand.

“This is a sad day for public education,” she said.

No student should be forced to be with an ineffective teacher in the classroom, Weingarten said.

“But in focusing on these teachers who make up a fraction of the workforce, he strips the hundreds of thousands of teachers who are doing a good job of any right to a voice."

During a two-month trial in the case, Vergara vs. California, both sides asserted that the interests of students were at stake.

The Silicon Valley-based group Students Matter brought the lawsuit on behalf of nine students, contending that five laws hindered the removal of ineffective teachers.

The result, attorneys for the plaintiffs said, is a workforce with thousands of “grossly ineffective” teachers, disproportionately hurting low-income and minority students. As a result, the suit argued, the laws violated California’s constitution, which provides for equal educational opportunity.

The laws were defended by the state of California and the two largest teacher unions -- the California Teachers Assn. and the California Federation of Teachers. Their attorneys countered that it is not the laws but poor management that is to blame for districts' failing to root out incompetent instructors.

Job protections benefit students by helping districts recruit and retain teachers, the state and the unions contended.

Both sides made their arguments inside and outside of court, fully expecting the case to reach the state Supreme Court.

The effort embodied a “broader communication goal,” said Felix Schein, a spokesman for the group that brought the case. “Our hope is that the trial sets a moral imperative for legislators or other policymakers,” Schein said.

Much of the case was a tutorial on school reform and competing theories of what works best to help students.

The evidence clearly showed that, in some cases, the teacher dismissal process can be long and expensive -- and that teachers have more protections against wrongful termination than other state employees.

The plaintiffs' side argued that the current situation was bad for students, forcing them to endure poor teachers and the state to squander educational resources trying to fire them.

The other side asserted that the rules resulted in fair outcomes for teachers, something that helps students in the long run.

Layoff rules that rely on seniority also were disputed. Strong but less-experienced teachers should not lose their jobs when layoffs are necessary, the attorneys representing the students said. Instead, they argued, quality should trump seniority.

The other side challenged how quality would be measured and pointed to a general correlation between experience and effectiveness.

Also at issue was the length of time before teachers could earn the strong job protections that come with tenure. California’s 18-month period is needlessly and harmfully short, those supporting the suit said.

The state and the unions defended the tenure rules as well, saying that the short-time frame was a trade-off that included benefits: Borderline teachers would be dismissed sooner while talented instructors could quickly obtain job security that would help to retain them in the field.

“Let’s be clear: Teachers who are unable to carry out their crucial work should be ushered out of the profession,” said Michael Powell, a spokesman for the American Federation of Teachers. “But the more important focus should be on recruiting, supporting and retaining great teachers for all our kids.”

Treu, who decided the case without a jury, gave few indications during the trial about how he would rule, asking tough questions of both sides.

Deasy appeared as a witness for those seeking to overturn the laws, but both sides cited his testimony as evidence for their case. Deasy was outside court Tuesday morning awaiting the delivery of the verdict. Parties to the case have 15 days to file objections to the judge's ruling.