SAN FRANCISCO — A federal appeals court says high school officials in Northern California acted appropriately when they ordered students wearing American flag T-shirts to turn the garments inside out during the Mexican independence celebration Cinco de Mayo.

The 9th U.S. Circuit Court of Appeals ruled Thursday that officials’ concerns of racial violence outweighed students’ freedom of expression rights.

Administrators feared the American-flag shirts would enflame the passions of Latino students celebrating the Mexican holiday. Live Oak High School in the San Jose suburb of Morgan Hill has a history of problems between white and Latino students on that day.