LOS ANGELES - One morning in May 2008, an eighth-grader walked into Janice Hart’s office at a Beverly Hills middle school crying.

She was upset and humiliated, and couldn’t possibly go to class, the girl told the counselor. The night before, a classmate had posted a video on YouTube with a group of other eighth graders bad-mouthing her, calling her “spoiled,’’ a “brat,’’ and a “slut.’’ Text and instant messages had been flying since. Half the class must have seen it by now, the girl told Hart.

Hart took the problem to the school’s vice principal and principal, who took it to a district administrator, who asked the district’s lawyers what they could do about it. In the end, citing “cyber-bullying’’ concerns, school officials suspended the girl who posted the video for two days. That student took the case to federal court, saying her free speech rights were violated.

Last month, a US District judge in LA sided with the student, saying the school went too far. Amid rising concerns over cyber-bullying, and even calls for criminalization, some courts, parents, and free speech advocates are pushing back - students, they say, have a First Amendment right to be nasty in cyberspace.

“To allow the school to cast this wide a net and suspend a student simply because another student takes offense to their speech, without any evidence that such speech caused a substantial disruption of the school’s activities, runs afoul [of the law],’’ judge Stephen V. Wilson wrote in a 60-page opinion.

“The court cannot uphold school discipline of student speech simply because young persons are unpredictable or immature, or because, in general, teenagers are emotionally fragile and may often fight over hurtful comments,’’ he wrote.

Schools’ ability to limit student speech is an age-old issue that has been repeatedly tried and tested in the courts, from armbands protesting the Vietnam war to banners promoting marijuana use.

But with teens’ social lives moving increasingly to cyberspace, where what previously might have been a private bickering is reproduced, publicized and documented for all to see, school officials find themselves on unfamiliar grounds in dealing with e-mails, instant messages, profile pages, videos, and the like that may result in hurt feelings or something more serious.

Free-speech advocates said the notoriety of highly publicized cases, such as the Missouri girl who committed suicide after a mean-spirited MySpace message, have led to schools overreacting and excessively cracking down on student expression when it comes to the Internet.

“It’s better to have a lawsuit and lose some money than have a situation where a student commits suicide,’’ said Eugene Volokh, a First Amendment scholar and law professor at the UCLA who has criticized a bill in Congress that would make cyber bullying punishable by as long as two years in prison.

“People don’t appreciate how much the First Amendment protects not only political and ideological speech, but also personal nastiness and chatter. . . . If all cruel teasing led to suicide, the human race would be extinct,’’ Volokh said.

The murkiness of this area of law and educational policy has led to legal challenges across the country over school officials’ restriction or discipline of student speech.

Attorneys and analysts said court decisions have been “all over the map’’ on such cases, offering little clarity to confused school administrators.

The US Supreme Court has yet to take up a case involving student speech online; the governing decision is from the 1969 Tinker v. Des Moines School District case, which held that student speech could not be limited unless it causes substantial disruption on campus.

© Copyright 2009 Globe Newspaper Company.