Authorities are investigating an altercation that occurred between a Philadelphia police officer and a teenage girl Monday in Kingsessing as officers were breaking up a fight.

Police Commissioner Richard Ross said Tuesday morning that the department's Internal Affairs unit is looking into the incident — which was captured on video and shared widely on social media — and that the officer involved has been taken off street duty pending the outcome of the investigation.

He said the officer admitted throwing a 16-year-old girl to the ground on the 1300 block of South 54th Street and then punching her after trying to separate the teen from a fight involving more than 30 people.

Video of the wild scene was posted on Facebook and Instagram. The officer and the teen can be seen shoving each other while moving away from a crowd. The camera then briefly focuses elsewhere, but it quickly pans back to show the officer throwing the teen to the ground, getting on top of her, and begin swinging.

What the video did not capture, Ross said, was the 16-year-old slapping the officer in the face before the officer tackled her. Ross said the teen – whom he did not identify – admitted doing so during an interview with police, and that the girl's story was "virtually identical" to that of the officer, whom he also did not identify.

"The whole scene was ugly," Ross said.

Warning: Videos contain violence and graphic language

Police said the officer had responded to the scene around 2:45 p.m. Monday for a report of a person with a weapon. Upon arrival, Ross said, there was a large brawl already underway, which authorities began attempting to break up.

Police said the girl admitted in an interview that she tried to interfere with officers arresting someone in the melee. The female officer then approached the teen to get her away from the scene, police said, and after the two argued and shoved one another, the teen allegedly slapped the officer in the face.

After their fight, the teen was taken to the Children's Hospital of Philadelphia for neck pain, police said. The officer sustained facial bruises but declined medical treatment.

Police said the 16-year-old was to be charged with assault on police, disorderly conduct, and related counts.