Confederate flags have been coming down across the South in the wake of a racism-motivated church massacre, but resistance in Virginia to removing the banners from public view resulted in the punishment Thursday of nearly two dozen high school students.

The students wore clothing featuring the slave states’ banner – the display of which is meant to show pride in one's heritage, not racism, many defenders say – apparently to protest a new rule that they cannot have the flag on their cars if they want a parking pass at Christiansburg High School.

Montgomery County Public Schools spokeswoman Brenda Drake told WSLS-TV, which first reported the incident, that 22 or 23 students were given one day of in-school suspension for violating the school dress code, which also bans display of the flag. Most were later given out-of-school suspensions.

It’s unclear if the school’s action would be found constitutional by courts. The Supreme Court found in the 1960s that the First Amendment protects high school students’ free speech rights, with limited exceptions.

“Clearly, the prohibition of expression of one particular opinion, at least without evidence that it is necessary to avoid material and substantial interference with schoolwork or discipline, is not constitutionally permissible,” justices ruled in the landmark case Tinker v. Des Moines.

Eugene Volokh, a UCLA law professor and First Amendment expert, says it’s unclear if the school district could successfully defend the mass suspension. It would need actual evidence that there were threats of violence or good reason to believe there would be serious disruption, he says.

That burden was met by a Tennessee school that banned Confederate flag clothing, yielding 23 dress code infractions for students, three of whom sued. That school’s citation of incidents including a racially charged fight and “hit lists” written on bathroom walls justified the ban, a panel of the U.S. Court of Appeals for the 6th Circuit ruled in 2008.

The photos with this story are just too good. Nothing like high school. @RobbyKorth http://t.co/3ZZjI1d0y7 pic.twitter.com/omgDqb29Tm — Cameron Austin (@CameronOAustin) September 17, 2015

A 5th Circuit panel in 2009 similarly upheld a Texas school’s Confederate flag ban, citing particularly ugly incidents such as a student shoving the flag in the faces of members of another school’s visiting all-black volleyball team and a 2006 incident in which “Confederate flags were flown over the flagpole on Martin Luther King Jr. Day and a white student simulated the lynching of an African-American student.”

That appeals panel also noted “it is possible for administrators to fail to meet this burden in the absence of past disruptions.”

Ninth Circuit judges found last year the speech-banning burden was met, too, by a California school that banned wearing the American flag on Cinco de Mayo, citing threats of violence. The Supreme Court declined to review the case.

Volokh notes, however, the Virginia school has yet to explain itself adequately.

WSLS-TV reports that school leaders “say an incident regarding the Confederate flag did occur at Christiansburg High School, but they cannot expand on the details.”

In a Thursday afternoon statement, Drake said, "We value our students’ First Amendment rights, but we must maintain an orderly and safe environment for all students. Incidents of racial tension at CHS support the continued prohibition of the Confederate flag in the building.”