SPRING HILL, Fla. — A Hernando County deputy fatally shot a pit bull after it attacked a fellow deputy, according to the Hernando County Sheriff's Department.

HCSO says that around 4:45 p.m. Thursday, a bus driver, with the Hernando County School District, contacted the Sheriff's Office in reference to a student who had allegedly battered the bus driver.

Deputies responded to the residence of the student on Seybold Drive in Spring Hill.

As deputies spoke to family members, deputies saw a pit bull inside the residence.

HCSO says that when the pit bull began to act aggressively toward the deputies, a family member placed the pit bull in the garage so deputies could continue their investigation.

A short time later, deputies were standing by the roadway when someone accidentally opened the garage door, allowing the dog to escape.

The dog proceeded to charge at one deputy, biting the deputy on the right elbow, according to the sheriff's office. While the deputy was able to break free, the dog attempted to bite the deputy a second time.

Upon the dog attempting to bite the deputy a second time, another deputy on scene fired their service weapon, killing the dog.

The dog was transported to Hernando County Animal Services for rabies testing.

The deputy who was bitten by the dog was treated at the scene.

The juvenile, who allegedly battered the bus driver, was charged with misdemeanor battery and transported to the Hernando County Detention Center.

No additional details are available at this time.