RIVERDALE, the Bronx — A young girl was critically injured when she was attacked by a dog in the Bronx Wednesday morning, police confirmed.

The girl was walking with her family near Huxley Avenue and Foster Place in the Riverdale neighborhood when a pit bull attacked her around 8 a.m., according to authorities.

A neighbor witnessed the incident and said he grabbed a baseball bat and hit the dog off the girl. "Once I saw him kind of jumping on the little girl, I just grabbed the bat," Bobby Mahoney said. After a few swings at the dog, Mahoney said the pit bull eventually let go and scurried off.

Mahoney told PIX11's Ayana Harry he doesn't feel like a hero. "I actually feel like I could have done something more" and he wished that the girl didn't have to go through all the pain.

Police said the girl was taken to a nearby hospital in critical condition.