A federal appeals court has upheld a California school's ban on t-shirts bearing the American flag.

The Ninth U.S. Circuit Court of Appeals ruled this week that Live Oak High School officials could ban their students from wearing American flag shirts on Cinco de Mayo, BBC reported. 

The court found that the teens' rights were not violated, since the school issued the restriction to dodge potential instances of violence.

Live Oak High School is reportedly known to have issues between its white and Latino student communities, particularly on the Mexican heritage and pride holiday. 

One of the lawyers representing a student told reporters he'd appeal the ruling. 

Judge Margaret McKeown wrote in Thursday's verdict that school officials had to weigh the severity of the situation.

"It was reasonable for school officials to proceed as though the threat of a potentially violent disturbance was real," McKeown wrote in the decision, which passed unanimously. 

Live Oak staff reportedly instructed some students wearing t-shirts with United States flags on the front to either flip them inside out, remove them, or go back home. 

Four teens opted to go home, BBC reported. Three of their families then filed lawsuits on grounds that school officials violated the students' freedom of expression rights. 

"It is truly a sad day when government officials are permitted to ban the American flag on a public high school campus for any reason," lawyer Robert Muise said, after stating his client's case to the Court of Appeals. 

Cinco de Mayo is a celebration that recognizes the Battle of Puebla - a historical fight in which the Mexican Army defeated Napoleon III's French troops, the BBC reported.