High school students in Iowa who were seen in a picture wearing Ku Klux Klan-style white hoods while burning what looked like a cross were disciplined by school officials after the image appeared on social media — even though the photo is not believed to have been taken on campus grounds or during school hours.

The Des Moines Register reported that officials at Creston Community High School, 70 miles south of Des Moines, discovered that at least some of the five people in the photo were students there. All five were seen wearing pointed hoods, their faces shielded, and standing near what looked like a cross in flames. At least one of them held what appears to be a weapon while another held what looked like a Confederate flag.

Exactly how the students were disciplined was not revealed because they are minors, but questions have been raised in the community about whether the school overstepped in its action. School officials don’t think so.

Bill Messerole, principal of Creston, said he could not discuss the details of the case but added that he found the picture “very disturbing.”

“That picture does not represent the values or culture of our school or community,” he said in an interview. Messerole also issued this statement explaining why the school acted as it did:

The Creston Community School District is committed to providing a positive and respectful learning environment for students.  As an educational institution, we strive to promote civil discourse and tolerance for differing views. However, when there is a substantial disruption of or material interference with the learning environment, it is appropriate for the District to take responsive action. We are hopeful that everyone can learn from this situation as we continue working to provide our students the best educational opportunities we can.

The Register said police did not get involved because it appeared that no crime had been committed. The picture does not appear to have been taken on school grounds, and there is a law in Iowa that says hate speech is a crime only when it targets specific people. Mark Kende, a law professor at Drake University who is also the head of the Constitutional Law Center there, said in an interview that legal precedent suggests that the students were not specifically targeting anyone.

“I think there is a potential problem because the school district — and this is not a criticism, because they may be following the law here — has been very confidential to some extent as to what discipline they have administered,” he said. “The bottom line is the discipline was directly connected to speech that occurred off campus, outside of school boundaries, and during people’s free time. There is no one who is targeted as far as we can see. No code words, names, and nobody looks like they were actually there at the scene.

Kende said a relevant precedent is the 1977 Supreme Court case involving a planned neo-Nazi march through Skokie, Ill., where many Holocaust survivors lived. The court ruled that a Nazi flag was free speech. Kende said that even though Holocaust survivors felt that they were personally being assaulted by the symbol, there was no specific target, and the neo-Nazi group won permission to march through the Chicago suburb, though it eventually moved the action somewhere else.

Kende said, however, that the school could have acted properly if the students violated rules of behavior set by organizations or athletic teams in which they participate. The Register quoted Jeff Bevins, athletic director and assistant principal, as saying that the students were involved in athletic and nonathletic school activities. A local newspaper,  the Creston News Advertiser, said the students were members of the football team.

“Absent something really targeting someone, it seems to me the school district has to be very cautious in how they approach this,” he said.

(Correction: An earlier version had the wrong date for a Supreme Court date. It was 1977, not 1997.)