Authorities say a New York City police officer has been shot after exchanging gunfire with a suspect involved in a large fight.

New York City Police Commissioner William Bratton said 25-year-old Officer Sharrod Stewart was shot in the ankle early Saturday morning, the day of his fourth anniversary with the department.

Bratton said officers were responding to a fight following a large party in the Bronx around 2 a.m. Five people have been hospitalized with stab wounds.

The shooting comes a day after a Philadelphia police officer was ambushed by a suspect and shot three times.

Bratton said a 19-year-old with a criminal history is in custody. He had been released following fare beating charges three hours prior to the shooting.

Officials said Stewart's injuries are not life-threatening.