A police officer fired his gun at a dog that “charged” at him on Wednesday afternoon in west suburban Naperville, police said.

About 2:45 p.m., the officer was called to the 5000 block of Christa Drive for reports of two Rottweilers running loose and chasing children as they got off a school bus, according to a statement from Naperville police.

When the officer arrived, he saw the dogs running toward firefighters and paramedics who were in the area on an unrelated call, and he yelled for them to get back in their vehicle, police said. The dogs then turned their attention to the officer and “began to charge at him,” according to police.

“Fearing for his safety and believing he would be unable to retreat without being attacked, the officer fired his weapon at the dogs, grazing one in the leg,” police said.

The dogs then ran to their home a half-mile away.

Their owner took the wounded dog to a veterinarian, and she was ticketed for “allowing the dogs to run at large,” police said. No people were hurt.