BROCKTON – Earlier this week, a 16-year-old boy was playing basketball outside when a red fox attacked him.

He kicked the fox away, but not before it bit him in the leg. The animal was captured the next day by Brockton animal control and euthanized.

Now city officials are warning residents about the fox, which was tested after its death and found Friday to be infected with rabies.

Anyone who came into contact or knows anyone who came into contact with a fox acting aggressively in the city should alert health officials, Animal Inspector Megan Hanrahan said. She posted notices about the fox in the Pinehurst Avenue area where the attack occurred.

Hanrahan said the fox is the first animal collected by officers in Brockton over the past three and a half years that has tested positive for rabies.

Rabies is a potentially fatal viral infection that attacks the nervous system, according to the Centers for Disease Control and Prevention. It can be treated in humans with a series of shots.