A police officer who was shot during a violent struggle with an armed and naked gunman in Harlem was likely saved by his bulletproof vest, police said.

The 34-year-old officer from NYPD's 32nd Precinct was taken to Mount Sinai St. Luke’s Hospital after he sustained a bullet which hit his bullet-proof vest on Wednesday morning.

Eight uniformed officers responded to the building shortly before 2am after receiving a 911 call from a resident saying a man was harassing her, banging on doors and breaking glass, Police Commissioner James O’Neill told reporters.

A police officer shot during a violent struggle with an armed and naked gunman in Harlem was likely saved by his bulletproof vest, police said. The officer is pictured leaving hospital

Police Commissioner James O’Neill shows reporters the officer's bulletproof vest which had a bullet hole in the chest area. Eight uniformed officers responded to a building in Harlem shortly before 2am after receiving a 911 call from a resident saying a man was harassing her

The wounded officer had called for help from other cops as a 'violent struggle' with a male suspect ensued at 2785 Frederick Douglas Boulevard.

The officers subsequently went to the second floor of the building to investigate the complaint and to locate the man.

The other officers discharged their firearms which struck the suspect several times, killing him.

Police said the gunfire at the building on Frederick Douglass Boulevard did not penetrate the officer's body.

Footage shows the officer being released from hospital in a wheelchair at 7am on Wednesday to applause from fellow officers who had gathered outside.

The officer was punched several times during the struggle with the suspect and was taken to Mount Sinai St. Luke’s Hospital. He is seen leaving as he is cheered by officers on Wednesday morning

The suspect, Victor Hernandez, was standing naked and pointed a 9mm semi-automatic handgun at the officer as he called for backup and seven other officers responded

The officer had been shot one time in the chest but the round did not penetrate his bullet-resistant vest. He was also punched numerous times, resulting in injuries to his face

The suspect's firearm was recovered at the scene and he was later identified as Victor Hernandez, 29, who was a superintendent at the building.

His mother was a police officer at the 52nd Precinct, sources told the New York Post.

O'Neill showed the media the bullethole in the officer's bulletproof vest and said he was punched a number of times by the suspect.

He explained: 'As the officers fanned out to search the second-floor hallway, one officer suddenly encountered the suspect standing naked, pointing a 9mm semiautomatic handgun at the officer.

Police Commissioner James P. O'Neill and New York Mayor Bill de Blasio speak to reporters at Mount Sinai St. Luke’s Hospital

The injured officer, who was not named, joined the NYPD in July 2012, and is assigned to Patrol in the 32 Precinct. His wife is also a police officer and they met while training at the academy

'The other officers discharged their firearms, striking the suspect several times. Our officer had been shot one time in the chest.

'The round did not penetrate his bullet-resistant vest. Our officer had also been punched numerous times, resulting in injuries to his face,' O'Neill said.

The injured officer, who was not named, joined the NYPD in July 2012, and is assigned to Patrol in the 32 Precinct. His wife is also a police officer and they met while training at the academy.

Answering questions, O'Neill said he did not know who or how many officers fired at Hernandez. He claimed this would be determined in an investigation into the incident.

The suspect's firearm was recovered at the scene and he was later identified as Victor Hernandez, 29, who was a superintendent at 2785 Frederick Douglas Boulevard, (pictured)

A map shows the scene of the shoot-out at 2785 Frederick Douglas Boulevard, Harlem

O'Neill claimed that the suspect had 'previous interactions with the police,' and also had two domestic violence arrests this year.

The sister of the woman who initially called the police told ABC7 that she feared the suspect who was acting strangely.

'She said that the man is dead in front of my door. She's the one who called because he was acting, a little off the rocker. He was acting crazy.'

New York Mayor Bill de Blasio praised the injured officer and claimed the incident was a danger that officers faced every day in the city.

He said of the officer: 'He's in good spirits, seven years on the job, absolutely an example of bravery and strength after what he had been through.

'He was still in good spirits, it's clear from this situation of the caliber of men and women in the NYPD, willing to go into danger at a moment's notice to protect all of us.

'The good news is he's coming through okay, he's shaken obviously but will be okay.'