ST. LOUIS (AP) -- A Missouri school district had the right to suspend a student who wore a baseball cap depicting the Confederate flag, a federal appeals court ruled Friday.The ruling by the 8th U.S. Circuit Court of Appeals in St. Louis said schools may restrict First Amendment free-speech rights "in certain limited circumstances."Bryce Archambo was a 14-year-old freshman when he was suspended from Farmington High School in September 2006, after wearing a baseball cap depicting the Confederate flag with the words, "C.S.A. Rebel Pride, 1861." A day later, he was sent home again, this time after wearing a T-shirt and belt buckle depicting the rebel flag.Archambo's family pulled him from school, began home-schooling him, and filed suit, claiming his right to free speech was violated. A district court ruling in 2007 sided with the school district, and a three-judge panel of the appeals court affirmed the lower court ruling."I just see it as a ruling for school boards and public school educators to be able to take proactive steps in prevention of potential violence," Farmington Superintendent W.L. Sanders said.Archambo's attorney, Robert Herman, said he will appeal to the U.S. Supreme Court."It's a sad day when a court rules someone's opinion is not protected because it offends other people," Herman said. "The essence of this ruling is Bryce can be punished because he expressed an opinion others found offensive."The suspension occurred during a time of heightened racial tension at the high school in Farmington, a community of 17,000 residents about 60 miles southwest of St. Louis.Court records show that in one case, a white Farmington student allegedly urinated on a black student while saying, "That is what black people deserve." The black student withdrew from the district.In another instance, white students, one with a baseball bat, showed up at a black student's home. When the black student's mother intervened, she was struck in the eye. Later, people drove around the home shouting racial slurs and threatening to burn down the house. The black student withdrew from school soon after that, and the family moved away.The court also cited a confrontation that occurred during a basketball game when two Farmington players who allegedly used racial slurs against two black players from nearby Festus. The schools no longer compete against each other.Farmington has a dress code stating that clothing "that materially disrupts the education environment will be prohibited." Sanders banned clothing depicting the Confederate flag.Archambo has argued that he wore the battle flag clothing not as a racial statement, but as a symbol of pride in his Southern heritage. The courts ruled that was irrelevant."Based on the substantial race-related events occurring both at the school and in the community, some of which involved the Confederate flag, we hold that the District's ban was constitutionally permissible," the appeals court ruling stated.