A federal appeals court ruled Thursday that school officials in northern California did not violate students' First Amendment rights by forcing them to remove clothing displaying the U.S. flag on Cinco de Mayo, for fear it would provoke a violent reaction from Hispanic classmates.

"School officials anticipated violence or substantial disruption of or material interference with school activities, and their response was tailored to the circumstances," Judge M. Margaret McKeown wrote in the opinion for the three-judge Ninth U.S. Circuit Court of Appeals panel. "As a consequence, we conclude that school officials did not violate the students' rights to freedom of expression, due process, or equal protection."

The court emphasized that "[school officials] did not punish the students" for wearing the flag, but were concerned that it would provoke a violent reaction.

"School officials have greater constitutional latitude to suppress student speech than to punish it," McKeown wrote, adding that "officials did not enforce a blanket ban on American flag apparel, but instead allowed two students to return to class when it became clear that their shirts were unlikely to make them targets of violence. The school distinguished among the students based on the perceived threat level, and did not embargo all flag-related clothing."

The school has a history of racial tension, which the court took into account.

The students' parents are expected to ask the Supreme Court to take up the case. "I was shocked to see the Ninth Circuit would deny the students their First Amendment right of free speech, and particularly their right to express their patriotism, at the expense of people celebrating another nation's pride," attorney William Becker said in response to the decision.

UCLA law professor Eugene Volokh suggested that the court may have correctly applied the law, but unfortunately sanctioned a "heckler's veto" by ruling against the students.

"The school taught its students a simple lesson: If you dislike speech and want it suppressed, then you can get what you want by threatening violence against the speakers," Volokh wrote in his blog, the Volokh Conspiracy. "The school will cave in, the speakers will be shut up, and you and your ideology will win."