NEW YORK - A New York City police officer has been released from the hospital after being shot during a violent struggle early Wednesday morning in Manhattan.

The incident occurred around 2 a.m. inside 2785 Frederick Douglass Boulevard in Harlem.

Police Commissioner James O'Neill said eight officers from the 32nd precinct were responding to a complaint from a female resident that a man was harassing her, banging on doors and breaking glass on the building's second floor.

O'Neill says one officer encountered the 29-year-old suspect who was naked and pointing a 9mm gun at him.

Sources say he was the superintendent of the building.

O'Neill says shots were fired between the two and the other responding officers.

One of the officers was struck in the chest covered by his bullet-resistant vest.

Multiple sources are telling NY1 the officer appears to have been injured by friendly fire, although the investigation is still ongoing.

Back in September, another NYPD officer, Brian Mulkeen, was shot by friendly fire while in an violent struggle with an armed man in the Bronx. Mulkeen was later pronounced dead at Jacobi Medical Center.

Pictured below is the bullet-resistant vest the officer was wearing when he was shot. pic.twitter.com/c4QzMAV7LK — NYPD NEWS (@NYPDnews) October 23, 2019

O'Neill says the officer was also punched multiple times in the face during a "violent struggle" with the suspect.

The injured officer was transported to Mount Sinai St. Luke's Hospital in stable condition.

The suspect was pronounced dead at Harlem Hospital.

The police commissioner says the suspect worked inside the building where the shooting took place and has had previous interactions with police including for domestic violence.

The suspect's gun was recovered at the scene.

At approx 01:51, Officers from the @NYPD32Pct responded to a 911 call for harassment inside 2785 Frederick Douglas Blvd.

While inside the building, one officer suddenly encountered the suspct, standing naked, pointing a gun at the officer.



Firearm pictured below ⬇️ pic.twitter.com/w2eVWr2MOT — NYPD NEWS (@NYPDnews) October 23, 2019

Police Commissioner O'Neill says he reviewed the body camera footage, noting it was "extremely disturbing".

Mayor Bill de Blasio said the injured officer, a seven year veteran of the department, was in "good spirits" when he visited him early Wednesday morning in the hospital.

"Absolutely an example of bravery and strength after what he had been through," De Blasio added.

This is the fourth shooting involving the NYPD in the past eight days. On Thursday, police fatally shot a man in the Norwood section of the Bronx after he hit an officer with a car, according to investigators.

Eight days ago in Boerum Hill, Brooklyn, officers fatally shot an armed man during a shooting in progress, the NYPD said.

About four hours later, police shot an armed man in the shoulder at the East 225th White Plains subway station in the Bronx. That man was hospitalized and survived.

No police officers were hurt in the previous three shootings.