Media playback is unsupported on your device Media caption An analysis of what happened in the classroom at Spring Valley High School and how the community reacted

A US police officer has been fired after video showing him throwing a female student across a classroom was shared widely on the internet.

Richland County Sheriff Leon Lott said that Senior Deputy Ben Fields "did not follow proper procedure".

He was a school resource officer at the school in South Carolina.

He "should not have thrown a student - he could have done a lot of things he was trained to do, he was not trained to throw a student", Sheriff Lott said.

The incident occurred at the Spring Valley High School in Columbia, witnesses said, when the unnamed African-American student refused to put away her mobile phone and then refused to leave the classroom.

The officer was then summoned and asked her to leave again. She refused, and he told her she was under arrest.

Video then shows the officer violently knocking the student down and pulling her across the floor.

The incident was filmed by a fellow student and was published on the internet, prompting the hashtag #AssaultAtSpringValleyHigh to circulate on Twitter and an outcry from various civil rights and parents' groups.

Image copyright Reuters Image caption Officer Fields was presented with a "Culture of Excellence" award last year by an elementary school where he was also assigned

Mr Lott said he had received expressions of support for the officer, who had been at the school seven years, from some parents and school officials. Officer Fields had received a "Culture of Excellence" award last year by an elementary school where he was also assigned.

But Sheriff Lott said the officer had "lost control" and had not dealt with this incident correctly.

"That is not a proper technique and should not be used in law enforcement. And based on that, that is a violation of our policy and approximately 20 minutes ago Officer Ben Fields was terminated from the Richland County Sheriff's Department."

He said complaints had been made about Officer Fields during his time at the school - some had been upheld and some had not.

Legal action has been taken three times against the officer, according to Associated Press news agency:

In January, Mr Fields will stand trial in the case of an expelled student who claims he targeted blacks and falsely accused him of being a gang member in 2013

In 2005, a federal jury found in Officer Fields' favour after a black couple accused him of excessive force and battery during a noise complaint arrest

Another lawsuit, dismissed in 2009, involved a woman who accused him of battery and violating her rights during a 2006 arrest

The deputy has not been criminally charged but the Federal Bureau of Investigation and justice department have opened a civil rights investigation into the arrest.

Fellow students at the school have tweeted claims that they have seen him behaving in a similar manner in the past, but this was the first time such an incident was caught on camera.

Sheriff Lott has said the girl was unhurt in the incident aside from a carpet burn.

However, the girl's attorney, Todd Rutherford, told ABC's Good Morning America' that she "has a cast on her arm, she has neck and back injuries" as well as a plaster on her forehead because of the carpet burn.

Sheriff Lott said he would "not describe the officer as remorseful, but he was sorry that the whole thing occurred".

What does a 'School Resource Officer' do?

a police officer placed in a school full-time as part of a "community policing" practice

offers programmes to reduce "crime, drug abuse, violence and provide a safe school environment"

accompanies school groups to athletic events and school trips

for younger children, they provide anti-drug programming

described as having schools as their "beat"

Source: Richland County Sheriff's Department