OAKLAND (CBS SF) – Just two days before he leaves the public school system, Oakland’s Brandon DeBose Jr. is celebrating not just his graduation, but a landmark victory against teacher tenure protections in California.

Debose, who is graduating from Skyline High School with Honors, was one of 9 California students who say they got stuck with bad teachers, leading to a case in a Los Angeles courtroom.

“In fifth grade I had a teacher who basically told me I wouldn’t amount to anything in life, but that’s not true. I’m graduating,” recalled DeBose Jr.

The lawsuit, backed by the powerful Silicon Valley nonprofit Students Mattered, argued that current laws that grant tenure after just 2 years hurt students. They also claimed that firing incompetent teachers is impossible and letting go of the newly-hired teachers first is harmful. On Tuesday a judge agreed, ruling that the tenure system violated the students’ right to an equal education.

The students had also charged that poor, minority communities became dumping grounds for the worst teachers.

“We finally, finally have the opportunity to redefine our system to one that will recognize the hard work by effective teachers,” said Bhavini Bhakta, a witness for the plaintiffs.

Unions have vowed to appeal the ruling.

“We have several children that are being used as pawns in this lawsuit,” said Jocelyn Merz, President of the Alum Rock Educators Association.

Merz said fixing the system in court is a waste of money.

“That is being paid for and promoted by corporate reformers who are not educators and who have an ultimate agenda of privatizing public education,” said Merz.

Existing laws will remain in place as the case works its way through the appeals process.