NEW YORK (CBSNewYork/AP) — A New York City police officer is recovering after being shot while exchanging gunfire with a suspect involved in a large fight in the Bronx, authorities said.

NYPD officers have been streaming in and out of Lincoln Hospital, keeping vigil for one of their own, CBS2’s Brian Conybeare reported.

READ MORE: Coroner Confirms Remains Found Are Gabby Petito's, Says Manner Of Death Is A Homicide As Search Resumes For Brian Laundrie

Police Commissioner Bill Bratton said 25-year-old Officer Sherrod Stuart was shot in the ankle early Saturday morning, the day of his fourth anniversary with the department.

It started around 2 a.m. inside what police call an illegal nightclub called The Sanctuary, operating in a building at 2505 3rd Avenue in the Mott Haven neighborhood.

Broken glass and debris still litter the doorway. Inside the venue, remnants of Friday night’s wild party can be seen — cups on the bar, empty liquor bottles and garbage all over the place, Conybeare reported.

One man, who did not want to give his name, said he worked at the party and claims it was legal, but it got out of control when a fight began.

“There was a group of guys that came from the development across the street and tried to get into the party,” the man said. “They couldn’t get in and the situations build outside.”

Bratton said Stuart was assigned to the plainclothes anti-crime patrol with his partner when they responded “to numerous 911 calls reporting a large fight in the streets with guns, bats and knives.”

Surveillance video shows the chaos near the scene as people ran from the violence, CBS2’s Steve Langford reported.

When police arrived on the scene, Stuart and his partner started chasing a suspect who opened fire, Bratton said. Stuart was struck in the right foot, but returned fire, striking the suspect four times, according to Bratton.

The suspect, identified as 19-year-old Christopher Rice, was rushed to Lincoln Hospital in serious condition.

Stuart was also hospitalized in stable condition. His wounds are not life-threatening, officials said. In a picture taken from his hospital bed, Stuart is seen smiling and giving the thumbs up with Bratton.

READ MORE: 7 Pedestrians Hurt After Being Struck By A Vehicle In The Bronx

Five people from the melee were also treated at hospitals for stab wounds, Bratton said, and four guns were recovered from the area.

Authorities are still trying to determine who else was involved in the brawl and why it started, CBS2’s Ilana Gold reported.

Left to right: The weapon police say suspect Christopher Rice shot Officer Sherrod Stuart with along with a pistol and knife recovered from the scene of the fight. (credit: NYPD)

Left to right: The weapon police say suspect Christopher Rice shot Officer Sherrod Stuart with along with a pistol and knife recovered from the scene of the fight. (credit: NYPD)

Rice has five prior arrests, Bratton said, including one on Friday morning for fare beating. He had been released from court at 11 p.m. Friday night, just three hours before the shooting, Bratton said.

In 2015, Rice was arrested for allegedly assaulting a police officer and resisting arrest, CBS2 reported. He was also charged in 2014 with resisting arrest and obstruction of justice, and in 2012 he was accused of assault, CBS2 reported.

https://twitter.com/AndreaGrymesTV/status/685810962134364160/photo/1

Stuart comes from a police family and his father is a detective with the NYPD, Bratton said.

“[Stuart] already has very, very impressive career in terms of the work he’s done, getting to the anti-crime unit, he has distinguished himself already,” Mayor Bill de Blasio said. “In this situation he has distinguished himself further with quick thinking and his brave actions and thank God his injuries are not life-threatening.”

The officer’s older brother, Edwyn Stuart, is also with the NYPD and told CBS2: “My brother is a good kid, a good cop, he did his job and I’m proud of him.”

Following news of the shooting, Bronx Borough President Ruben Diaz Jr. and local activists rallied against gun violence Saturday afternoon, WCBS 880’s Stephanie Colombini reported.

Diaz condemned the violent scene that broke out at the so-called pop-up party in a rental space above a Chase Bank.

“An establishment like this one should be a place where you go and party. It should be a place where you celebrate life. It should not be a deathtrap of blood and carnage,” Diaz said.

The borough president then urged lawmakers to take concrete action to reduce gun violence in the city. He also called on event organizers who throw pop-up parties that get promoted to the masses on social media to be more cautious about who they allow inside.

The shooting comes a day after a Philadelphia police officer was ambushed by a suspect and shot three times. After that shooting and one at a police station in Paris, the NYPD urged its members to be have “heightened vigilance.”

MORE NEWS: CBS2's Lonnie Quinn Discusses His Bout With Breakthrough Case Of COVID-19

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)