A court upheld most provisions of an Arizona state law used to prohibit a controversial Mexican-American Studies curriculum in Tucson on Friday.

The ruling dealt a blow to supporters of the suspended classes, who had hoped the courts would overturn a 2010 law championed by Arizona conservatives determined to shut down the unconventional courses.

“I was really surprised at the decision,” Jose Gonzalez, a former teacher of Tucson's suspended Mexican-American Studies classes, told The Huffington Post. “But as a student and teacher of history, I know in civil rights cases like this there’s always setbacks.”

The experimental Tucson curriculum was offered to students in different forms in some of the local elementary, middle and high schools. It emphasized critical thinking and focused on Mexican-American literature and perspectives. Supporters lauded the program, pointing to increased graduation rates, high student achievement and a state-commissioned independent audit that recommended expanding the classes.

But conservative opponents accused the teachers of encouraging students to adopt left-wing ideas and resent white people, a charge the teachers deny. Aiming squarely at Tucson’s Mexican-American Studies program, the Arizona legislature passed HB 2281 -- a law banning courses that promote the overthrow of the U.S. government, foster racial resentment, are designed for students of a particular ethnic group or that advocate ethnic solidarity.

Federal Judge Wallace Tashima said the plaintiffs failed to show the law was too vague, broad or discriminatory, or that it violated students’ first amendment rights.

The news wasn’t all bad for supporters of the suspended classes. Tashima ruled that the section of the law prohibiting courses tailored to serve students of a particular ethnicity was unconstitutional.

Originally filed in October of 2010 on behalf of the program's former teachers, who lost standing because they are public employees, the case is currently brought by former Mexican-American Studies student Nicholas Dominguez and his mother Margarita Dominguez. They will likely appeal the ruling to the 9th U.S. Circuit Court of Appeals within the next 30 days, their lawyer Richard Martinez told The Huffington Post.

“This case is not over,” Martinez said. “It’s not only important to Arizona, but to the country as a whole that this statute be addressed.”

Arizona Attorney General Tom Horne began a campaign to eliminate the Mexican-American Studies program from Tucson Unified School District in 2006, when he was serving as the state’s Superintendent of Public Education.

Angered that Mexican-American civil rights leader Dolores Huerta had said that “Republicans hate Latinos” in a speech to Tucson students, Horne sent Deputy Superintendent Margaret Dugan, a Latina Republican, to give an alternate view. But the intellectual exercise turned confrontational when students, who said they were not allowed to ask Dugan questions, sealed their mouths with tape and walked out of the assembly room.

“As superintendent of schools, I have visited over 1,000 schools and I’ve never seen students be disrespectful to a teacher in that way,” Horne said in an interview last year.

The final product of his efforts was House Bill 2281, which then-State Sen. John Huppenthal (R) helped pilot through the Arizona legislature. Huppenthal, who succeeded Horne as state superintendent of schools, then found Tucson out of compliance with the new law and ordered the district to shut Mexican-American Studies down or lose 10 percent of its annual funding -- some $14 million over the fiscal year. In January of 2012, the school board complied, voting 4 to 1 to discontinue the classes.

The decision drew national attention as administrators plucked Latino literature that once belonged to the curriculum from classrooms, explicitly banning seven titles from instruction.

Tashima wrote in Friday’s ruling that Horne’s anti-Mexican-American Studies zeal bordered on discrimination.

“This single-minded focus on terminating the MAS (Mexican-American Studies) program, along with Horne’s decision not to issue findings against other ethnic studies programs, is at least suggestive of discriminatory intent,” Tashima wrote.

But the federal judge stopped short of invalidating the law on those grounds.

"Although some aspects of the record may be viewed to spark suspicion that the Latino population has been improperly targeted, on the whole, the evidence indicates that Defendants targeted the MAS program, not Latino students, teachers or community members who participated in the program," the judge wrote in the ruling.

Not everyone agrees.

Writer and activist Tony Diaz -- who along with independent journalist Liana Lopez and multimedia artist Bryan Parras launched a “librotraficante” caravan to “smuggle” books banned from Tucson classrooms into Arizona -- said the court had “failed our youth, our culture and freedom of speech” by upholding the Arizona ethnic studies law.