Richmond police officers were stunned and perplexed Tuesday, after one of their K-9 units abruptly turned on a fellow, albeit human, officer.

It was 6:50 a.m. Tuesday when the street-clothes-clad cop made his way through the Richmond Police Department headquarters' parking lot at 1701 Regatta Boulevard.

Suddenly and without warning a Belgian Malinois, one of Richmond PD's six dogs on staff, attacked the man.

During the fray, the officer shot the dog at least once, wounding the animal and ending the attack.

Richmond police Sargent Nicole Abetkov says that the dog, who has been trained to capture suspects and detect drugs, had been secured in one of the department's Chevrolet patrol vehicles. Police still aren't sure how the dog got out, Abetkov says.

"The dog’s handler was inside the building for a meeting, but there are protocols in place to keep the dogs contained when unattended," CBS5 reports.

The officer was transported to an area hospital for treatment of his injuries. "He's going to be OK," Abetkov says.

The injured dog was taken to a veterinary hospital in Berkeley, and is in stable condition, the Chron reports.

According to Richmond PD Captain Mark Gagan, the incident was captured on the department's surveillance cameras. That footage will be scrutinized as they investigate what led to the attack.

“The dogs are really supposed to be cued to use force," Gagan says.

"We have to figure out what chain of events led to the officer being bitten.”