Now that law, which some legal experts say may be the broadest and vaguest of its kind in the country, is being challenged in a federal lawsuit filed Thursday. One of the plaintiffs is Niya Kenny, a classmate of the defiant girl in the video, who stood and yelled curses at the officer for his rough behavior. Both girls were arrested and charged with disrupting class.

In an interview this week, Ms. Kenny, now 18, described her turmoil as she was handcuffed at school and taken in a paddy wagon to spend several hours at an adult detention center where she was fingerprinted and had a mug shot taken — all, she said, because she stood up for her classmate.

“I was just terrified through the whole day,” she recalled.

According to Ms. Kenny’s account and the police report of her arrest, she did nothing to physically interfere with the sheriff’s deputy as he grabbed and slammed her classmate. “I was cursing at him and saying it was unfair,” she recalled.

More than 1,200 students, disproportionately black, are arrested under this law each year, according to state data, for everything from disobeying a teacher’s order to fighting in the hallway. For many, like Ms. Kenny, it means a first, stinging encounter with the criminal justice system, bringing the stigma of an arrest record and often derailing their schooling — a potential step in what has been described nationally as a pernicious “schools to prison pipeline.”

With its vague evocation of criminal acts, the law “creates an impossible standard for school children to follow and for police to enforce with consistency and fairness,” according to the suit, which was filed by the American Civil Liberties Union on behalf of several students.