Stockton Police said a prowler, who they later identified as a documented gang member, was later shot dead after breaking into a children's group home, at the end of a dead end street.
"The suspect actually stabbed the K-9," Stockton Police Officer Joe Silva said.
The suspect had broken through the front door, then tried to knock down two other doors inside, investigators said.
Terrified, the children and a couple of adults hid.
"They actually barricaded themselves because they didn't know what this man was going to do to them," Silva said.
When police arrived, the suspect ignored officers demands to surrender
They Tasered him, then sent in a police dog, which the suspect kicked and then stabbed.
"Our K-9 officer went in to rescue his dog, pulled the dog away from the suspect, at which point the suspect then put the knife over his head and made advancements toward both of our officers," Silva said.
That's when the dog handler and another officer shot and killed the suspect.
It turns out, he was no stranger to police.
"He's been arrested twice for being in possession of a bladed weapon and once for resisting arrest," Silva said.
Meanwhile, the Dutch Shepard K-9 officer is recovering in Sacramento and is expected to be O.K.