ANAHEIM (CBSLA) – An Anaheim police K-9 was attacked by a pit bull Wednesday while taking part in a search for a stabbing suspect.

According to Anaheim police spokesperson Sgt. Daron Wyatt, the incident began just before noon as officers were searching for a stabbing suspect.

READ MORE: Child, 18 Months, Killed in North Hills Crash; Driver Still At Large

A police K-9 is attacked by a pit bull in Anaheim, Calif., on Oct. 2, 2019. (CBS2)

A police helicopter spotted a man run from the scene and then jumping through the front window of a house a few blocks away, Wyatt said. Officers surrounded the home and called for the man to surrender.

READ MORE: Bill Clinton Released From UCI Medical Center After 5 Nights

He eventually came out, but so did a large pit bull, which charged the K-9, prompting an officer to taze the pit bull in order to subdue it.

Both dogs are expected to be OK. The pit bull was turned over to Orange County Animal Care.

The man taken into custody is not believed to be connected to the stabbing, Wyatt said. Officers learned he ran because he is a wanted parolee-at-large. His name was not released.

MORE NEWS: `Solidarity' Cited In New Deal For 40k Behind-the-Scenes Film & TV Workers

The details of the stabbing were not released.