A California police officer warned a knife-wielding 17-year-old girl that something "bad would happen" if she didn't put down the weapon she was carrying.
But the teenager refused to follow his commands.
Seconds later, she ran toward the officer and he shot her, KTLA-TV reported.
She collapsed and the officer began helping her. She can be heard apologizing to the officer in the bodycam video released Thursday.
What the heck was going on?
The May 3 incident began when Officer Timothy Roberts responded to a disturbance call about a girl with a large knife, according to Police Chief Scott Whitney, KTLA reported. The identity of the girl has not been released since she is a minor.
When Roberts arrived on the scene, he activated his bodycam, which showed the girl carrying a large knife in her right hand.
Roberts can be heard in the video warning the girl not to pull the knife from her pocket.
"Why, what happens if I reach for it?" the girl asked him.
"Then something bad is going to happen," Roberts responded.
The officer pulled out his weapon and began backing away from the girl who was walking toward him.
She pulls the knife out of her pocket and continues ignoring his commands to drop it.
Suddenly, the girl, who is holding the knife in her right hand, started running toward Roberts who fires multiple shots at her.
Roberts, along with another officer who arrived as backup, immediately began providing medical help to the girl while they waited for paramedics to arrive.
"I'm so sorry," the girl told the officer.
"It's OK," an officer responded.
It isn't immediately clear why the girl was causing the initial disturbance or why she didn't follow the officer's commands.
The girl remains in the hospital in critical but stable condition, according to officials.
Roberts is on administrative leave while the investigation continues. The officer has worked for the department since 2015, according to KTLA.
Warning: this video contains disturbing content