In another video, he can be heard telling another student, “I’ll put you in jail next.”

Lt. Curtis Wilson, a sheriff’s spokesman, said the girl and a male student were arrested after the confrontation, according to The State, a South Carolina newspaper. They were charged with disturbing the peace, and the girl was released to the custody of her parents, according to the television station WLTX. The confrontation drew outrage as the videos spread.

Victoria Middleton, the executive director for the South Carolina branch of the American Civil Liberties Union, said: “There is no justification whatsoever for treating a child like this. Regardless of the reason for the officer’s actions, such egregious use of force — against young people who are sitting in their classrooms — is outrageous. School should be a place to learn and grow, not a place to be brutalized.”

“We must take action to address the criminalization of children in South Carolina, especially at school,” she added.

Officer Fields joined the sheriff’s department in 2004 and became a school resource officer in 2008, according to a department newsletter from last November, which also noted his receiving the school district’s “Culture of Excellence Award.” Besides Spring Valley High School he was also assigned to Lonnie B. Nelson Elementary School, the newsletter said, “and has proven to be an exceptional role model to the students he serves and protects.”

But two lawsuits filed in federal court paint a different picture of the sheriff’s deputy.

The most recent, filed in November 2013 by a former Spring Valley student, Ashton Reese, charge Officer Fields and the school district of violating his civil rights. Mr. Reese was expelled in February 2013 for “unlawful assembly of gang activity and assault and battery” after an investigation by the officer concluded that he had been involved in a fight behind a store near the school, according to the complaint filed with the Columbia division of Federal District Court.

The lawsuit said Officer Fields “unfairly and recklessly targets African-American students with allegations of gang membership and criminal gang activity.” A jury trial is set to start on Jan. 27.

In 2007, Carlos Martin and his wife, Tashiana Martin, sued Officer Fields, Sheriff Lott and another deputy, Robert Clark, for violating their civil rights during a routine investigation of a noise complaint. Mr. Martin said in court papers that Officer Fields stopped him as he was getting out of his car at home and grew angry when he addressed him as “dude,” despite Mr. Martin’s assurances that he did not intend to be disrespectful. A short time later, the officer slammed Mr. Martin to the ground, handcuffed and began kicking him, according to the complaint, which also said the officer emptied a can of pepper spray that drenched Mr. Martin’s clothes.