A dog running loose Thursday on the campus of Hanes Magnet School bit a middle-schooler and was shot by a school-resource officer, authorities said.

The 11-year-old student, who was headed to a team practice after school, received minor injuries from a bite on the leg and was taken to the doctor’s office by a parent, said Brent Campbell, a spokesman for Winston-Salem/Forsyth County Schools.

Two unsecured dogs were running around the campus on Pleasant Street near the ball field where students were playing, Winston-Salem Police said in a news release.

“The students were on their way to practice behind the school in the field-and-track area,” Campbell said. “The dog made its way onto campus and did bite one of the students.”

Staff members and the school’s resource officer were around during the 2:30 p.m. incident and got the dog off the student.

The school-resource officer discharged two rounds from his firearm as one of the dogs continued to aggressively charge, police said. Both rounds struck the dog, a light brown Brindle pit bull, which fled but was found nearby on Marble Street, police said.

The dog was secured by officers with Forsyth County Animal Services and taken to a veterinarian. It was later euthanized, said Lt. David Morris, the director of animal services. The dog’s owner has been identified, and a joint investigation is being conducted by Animal Services and police to determine if criminal charges will be sought, police said.