LOS ANGELES — A California judge ruled Tuesday that teacher tenure laws deprived students of their right to an education under the State Constitution and violated their civil rights. The decision hands teachers’ unions a major defeat in a landmark case, one that could radically alter how California teachers are hired and fired and prompt challenges to tenure laws in other states.

“Substantial evidence presented makes it clear to this court that the challenged statutes disproportionately affect poor and/or minority students,” Judge Rolf M. Treu of Los Angeles Superior Court wrote in the ruling. “The evidence is compelling. Indeed, it shocks the conscience.”

The decision, which was enthusiastically endorsed by Education Secretary Arne Duncan, brings a close to the first chapter of the case, Vergara v. California, in which a group of student plaintiffs backed by a Silicon Valley millionaire argued that state tenure laws had deprived them of a decent education by leaving bad teachers in place.

Both sides expect the case to generate more like it in cities and states around the country. David Welch, a Silicon Valley technology magnate, spent several million dollars to create the organization that brought the Vergara case to court — Students Matter — and paid for a team of high-profile lawyers, including Theodore J. Boutrous Jr., who helped win a Supreme Court decision striking down California’s same-sex marriage ban. While the next move is still unclear, the group is considering filing lawsuits in New York, Connecticut, Maryland, Oregon, New Mexico, Idaho and Kansas as well as other states with powerful unions where legislatures have defeated attempts to change teacher tenure laws.