Racial tensions and gang problems were plaguing a Northern California high school when three students arrived for classes in 2010 wearing American flag T-shirts on Cinco de Mayo.

Unpleasant verbal exchanges and altercations marked the previous year's Cinco de Mayo celebrations at Live Oak High School in Morgan Hill, 20 miles south of San Jose. So when students told administrators that trouble was a possibility because of the American flag attire, the students were ordered to turn their shirts inside out or go home.

They went home, and the incident sparked a national debate, prompting satellite news trucks to camp outside the school for several days afterward as well-known pundits across the political spectrum argued about the issue over the airwaves. Cinco de Mayo is observed by some as a celebration of Mexican heritage.

The three students have since graduated, but a federal appeals court in San Francisco on Thursday will consider their lawsuit alleging the school violated their free speech and equal protections rights guaranteed by the U.S. Constitution. The three-judge panel of the 9th U.S. Circuit Court of Appeals is not expected to rule Thursday.

A lower court tossed out the students' lawsuit in December 2011, ruling that school administrators have wide legal latitude to ensure the safety and effective operation of their campuses and a "perceived threat" of violence vindicated the principal's decision.

The lower court judge who tossed out the case, the now-retired Chief Judge James Ware, noted that "our Constitution grants public school children only limited First Amendment rights when they enter the schoolhouse gates," while conceding this particular case has landed in "important legal territory."

University of California, Los Angeles, law professor and free speech expert Eugene Volokh calls such punishment a "heckler's veto." In public, speakers are protected from such a restriction and allowed to voice most opinions. On-campus students don't enjoy the same free speech rights.

"A school may restrict a student's speech," Volokh said, "to prevent unruly disruptions."

Still, Volokh said administrators can -- and sometimes do -- go too far and overreact to a perceived threat that may not cause a big enough on-campus stir to warrant the censorship.

"The fact of the matter is that these Americans were punished for wearing the American flag at an American school," Volokh said.

The students' lawyers work for three separate nonprofit legal centers dedicated to politically conservative causes.

William J. Becker Jr., of the newly formed Freedom X organization based in Los Angeles, said in a phone interview Wednesday that the trial court judge who tossed out the case was "unfortunately too wrapped up in political correctness" in ruling the school's action was appropriate because administrators perceived a threat. Lawyers with the Thomas More Law Center and American Freedom Law center, both based in Ann Arbor, Mich., also represent the former students.

Becker argues that to censor students' free speech rights, an actual and "immediate" threat of violence or disruption has to be apparent.

"Nobody is alleging that any disruption was caused by the shirts," Becker said. "The students in this case were deprived of their Constitutional rights simply by displaying their patriotism."

School officials and their lawyer didn't return phone calls Wednesday.

"This is not a case about the flag, or the First Amendment rights of adults in a public forum," the school district lawyer's argued in court papers. "This is a case about whether we allow school administrators, familiar with the circumstances in their schools, to take reasonable steps to protect student safety in the face of threats and a history of violence."