A Florida school resource deputy seen on a body-camera video grabbing a middle school girl by the back of her headscarf while detaining her was removed from the school and fired from the sheriff's office.

Orange County Sheriff John Mina said in a statement on Twitter that he was made aware of the video Friday morning and was "very upset" by the resource deputy's "inappropriate amount of force." The sheriff's office released the body-camera footage after it surfaced on social media.

The incident occurred Thursday off of school property outside a nearby apartment complex, a spokesperson for Orange County Public Schools said.

It was not clear how the confrontation began but police said they were called because of a fight. In the video, the girl is standing by a car as she appears to scream and cry.

"Relax. I'm not yelling at you. Calm down," one deputy tells her.

A second deputy, the one who was fired, curses at the girl and then attempts to detain her. The deputy then grabs the girl by a scarf wrapped around her head and walks her toward a squad car. A crowd of people gathered around them begins to yell at the deputy who grabbed the girl.

When a woman walks over to talk to the second deputy, he whips out his baton and screams at the crowd to get back.

“This is because you’re silly. You all stupid little children," the deputy yells.

Later in the video, the deputy who grabbed the girl is seen talking to a woman about the girl fighting. According to a redacted 911 call log, police received a report of a fight involving several people across the street from a school.

The girl was briefly detained and then released to a parent, sheriff Mina wrote in the statement, saying the deputy's actions "appear to violate some of the most important values and expectations that I have set."

He added: "The type of behavior I witnessed on the video and on body worn camera video will not be tolerated."

During a news conference on Friday afternoon, Mina said the deputy, who he is not yet naming, was removed from the school and later terminated from the department. The deputy was hired by the Orange County Sheriff's Office in February 2019.

The sheriff's office has not identified what school the deputy worked for. The case will be submitted to the state's Attorney's Office for review, Mina said.

A spokesperson for Orange County Public Schools said the video was taken at an apartment complex on Thursday.

"We appreciate Sheriff Mina acting quickly to remove the assigned deputy from our school and open an investigation into the incident," the spokesperson said. "We will assist with the investigation, as needed.”

The sheriff praised the first deputy for trying to calm the girl down and deescalating the situation. He said the school resource deputy, who was providing assistance, made the situation worse.

"What I saw, and what my staff saw, was a deputy that was out of control," he said at the news conference.

Rep. Anna V. Eskamani, D-Fla., said in a tweet that she is happy that Mina took action against the deputy.

"Good - this is how the school to prison pipeline happens," she tweeted. "Excessive use of force on one student and then verbal insults towards all students. Unbelievable and hurts all efforts by police to build community trust."