Warning: Photos may be graphic for some viewers. 

A Maricopa County Animal Control officer was bitten twice in the arm Wednesday while trying to fulfill a Chandler court order to impound a dog, officials say.

Officer Rick Alva, a 20-year employee with the county, was hospitalized and will need surgery for his injuries. 

Maricopa County Animal Care and Control says the owner failed to restrain the dog. 

When Alva arrived at the owner's house, the dog bit him in the right arm. He was unable to get away the dog bit him again in the same area, refusing to let go. A Chandler police officer who witnessed the attack then shot and killed the dog.

MCACC officer bit 11-7-18
Officer Rick Alva was bitten by a dog while trying to fulfill a court order to impound it, MCACC says.
MCACC
MCACC officer bit 11-7-18
Officer Rick Alva's injuries required surgery.
MCACC

The dog, a Rottweiler named Rocky, had bit people in three separate incidents, according to MCACC. Rocky's history shows he bit someone while he was loose in June of 2007. In February of this year, he bit a veterinary technician at a clinic. Lastly, in September, Rocky was a nursing home where he bit a resident. All three people were hospitalized. 

After the incident at the nursing home, a Chandler court got involved. Officer Alva was there to impound the dog until a court hearing could take place on Nov. 13. 

MCACC has filed charges against the dog’s owner Larry Jerdee. The agency also asked that the Chandler Police Department investigate if an assault charge is applicable. 

The dog's remains are being tested for rabies.