FILE - In this April 4, 2021, file photo provided by the American Civil Liberties Union, Brandi Levy wears her cheerleading…
FILE - Brandi Levy wears her cheerleading outfit as she looks at her mobile phone outside Mahanoy Area High School in Mahanoy City, Pa., April 4, 2021. (American Civil Liberties Union photo)

In a high-profile free speech case, the U.S. Supreme Court ruled Wednesday that a school can’t regulate most off-campus speech by its students. 

In its 8-1 ruling, the court said, "While public schools may have a special interest in regulating some off-campus student speech, the special interests offered by the school are not sufficient to overcome B.L.’s interest in free expression in this case."

The case stems from the actions of former Pennsylvania high school cheerleader Brandi Levy, who lashed out at her school on Snapchat on a Saturday in 2017 after not making the varsity team.

Using coarse language, she expressed her disdain for school, cheerleading, softball and “everything.”

In response, her school said she’d violated the code of conduct and suspended her from cheerleading for a year.

Justice Stepen Breyer, writing for the majority, however, said a school could intervene in some cases, such as speech that involves bullying or threats to teachers or students.

Justice Clarence Thomas dissented.

School district's position

The Mahanoy Area School District in which Levy was enrolled argued that with the spread of technology and the prevalence of remote learning brought on by the coronavirus pandemic, the lines between on-campus and off-campus speech had been blurred.

Levy’s parents asked her school to lift the suspension, but when it refused, they filed a federal lawsuit saying the school was violating their daughter’s free-speech rights. A federal court in Pennsylvania ruled in favor of the parents as did the 3rd U.S. Circuit Court of Appeals.

The American Civil Liberties Union of Pennsylvania said students "have the right to find their voices without being unduly chilled," adding that "government may not penalize speech because listeners find it offensive or even disagreeable."

Levy, who is now in college, said she’d sent the message to vent her frustration.

"I was a 14-year-old kid expressing my feelings and that's how kids do it, over social media," she said, NBC News reported.