A U.S. Park Police officer accidentally shot himself Thursday while being attacked by a rabid raccoon in northwest D.C., police said.

The officer was attacked in the 2500 block of Horse Stable Lane NW near St. John's College High School, in a more suburban area near Rock Creek Park.

While trying to fend off the raccoon, he attempted to shoot the animal but accidentally shot himself in the foot.

At some point, a second officer arrived and shot and killed the raccoon.

"I heard what sounded like five shots, perhaps. I'm not sure," said Jim Hunt, who lives nearby.

The officer was taken to a local hospital with non-life-threatening injuries, Park Police said.

No one else was hurt in the incident.

Hunt told News4 raccoon sightings aren't unusual in the area.

"I've seen what I thought are rabid raccoons out here before. You see them in the daytime kind of staggering around. You can only assume that something's not right," Hunt said.

Stay with NBCWashington.com for more.