This teen’s racist prom invite was a bad idea. But a free-speech expert says it’s his right.

A Florida school says that it will likely discipline a white high school student after a photo of him posing with a racist prom invitation drew wide attention on social media over the weekend.

The student, who officials confirm is 18-year-old Noah Crowley, was seen holding up a sign with a message asking another student to prom that said, “If I was black I’d be picking cotton, but I’m white so I’m picking U 4 prom?” in a student’s post on Snapchat. It was not immediately clear who posted the photograph to the social media service.

The story generated anger on social media and found traction on Google News after being covered by national media outlets such as the Huffington Post and the New York Daily News, drawing a surge of attention to Riverview High School, a public school of 2,600 students in Sarasota.

Tracey Beeker, a spokeswoman for the school district, said that the high school senior will “more than likely” face disciplinary measures.

“This incident is a gray area,” Beeker told The Washington Post, “but there has been disruption at the school due to his actions.”

A social media policy she distributed said that students’ use of personal technology may violate its policies if school authorities “reasonably believe the conduct or speech has caused or will cause actual, material disruption of school activities or a staff member’s ability to perform his or her job duties.”

It also notes that “using profanity, obscenity, epithets or other language that violates generally accepted norms of appropriate public discourse” is prohibited.

But high school students do have free-speech rights, which are typically stronger in off-campus contexts than on campus or at school events, Fred Smith Jr., an associate professor of law at Emory University, said in an interview.

“Students have free-speech rights when they’re on campus, but they’re much greater when they’re off-campus,” Smith said. “Just like the rest of us, students have the ability to say things that are offensive. And the reason why we have free speech is to protect unpopular views. That’s why it’s there. Given that he was off of the school campus, the mere fact that his speech was offensive would strike me as an insufficient basis for the school to punish him.”

Smith said that the question of whether speech occurring off-campus and not during a school-connected activity could be held accountable for a campus disruption had yet to be answered by the Supreme Court.

“My understanding is that the lower courts have been all over the place,” he said about similar cases.

And he said there was a high bar to show that the speech had been disruptive as well, noting that in one of the most famous student free-speech cases, Tinker v. Des Moines, the Supreme Court sided with students who wore black armbands to protest the Vietnam War and not school administrators, who had argued the visual protests were disruptive.

Crowley apologized on social media on Sunday, according to WTSP, and his statement was released Tuesday by a public relations firm hired by his family:

“I want to sincerely apologize if I have offended anyone with the picture going around. That was not my intention,” the statement said. “It was a completely joke and it went too far. After reading the texts and Snapchat’s I truly see how I have offended people and I’m sorry.”

His family said that he will not be attending the school’s prom, graduation or other school activities. Spokeswoman Beth Leytham said that he may not attend the final two weeks of school, either.

“While our son has apologized himself, on behalf of our family, we wish to also express our most sincere apologies for the terrible words used in his ‘promposal,’ ” the statement read. “As a family, we truly recognize this incident is a very difficult but important life lesson and pledge to do all we can to ensure that nothing like this ever happens again. Certainly, we hope that all of the people and communities who were hurt and offended will forgive our son and family.”

The school also sent a statement to parents and students at the school, and said it was working with the NAACP and other civic leaders “to develop a roundtable forum to discuss the issue of race.”

“Many who saw the post, and subsequent apology, are understandably upset with its contents and commentary,” the district said in a statement earlier this week. “Neither the school district nor Riverview High School condones or supports the message conveyed in the post.”

Trevor Harvey, the president of the NAACP chapter in Sarasota, said that district officials had reached out to him.

“The district [must] make the student body aware that they will not accept this kind of behavior,” he told the Tampa Bay Times. “We can have all the conversations we want, but if there is no action, then we are not really doing anything productive.”

A classmate of Crowley’s, Erin Williams, told Fox 13, “You think that this happens in other cities and states, and it’s just like, ‘No this is right here in your home town, a boy that you know.’

“He thought it was a joke, and it’s not funny. It’s not something that should be joked around with.”