New York Police Department officers took the man to a hospital in a police vehicle and he was pronounced dead, Chief of Patrol Philip Rivera told reporters. Police officers were taken to a hospital for evaluationMembers of the NYPD crime scene unit place evidence markers in the area of Madison Avenue and East 95th Street where a fatal police involved shooting occurred Members of the NYPD crime scene unit place evidence markers in the area of Madison Avenue and East 95th Street where a fatal police involved shooting occurred (Image: Kyle Mazza/Shutterstock)

A man with a gun was killed Thursday in a shootout with police in New York City after he pointed his weapon at a man in an apartment building elevator and a deli worker and threatened to shoot up a hospital, police said.

New York Police Department officers took the man to a hospital in a police vehicle and he was pronounced dead, Chief of Patrol Philip Rivera told reporters. Police officers were taken to a hospital for evaluation.

The man was in an elevator in a residential building in Manhattan’s Upper East Side around 7 p.m. when spoke to another man and then pulled out a firearm and pointed it at him, police said.

READ MORE: Huge flames engulf vehicles on Manhattan street in shocking video leaving NYC on edgeREAD MORE: New York teen ‘chopped of stepdad’s head with a hacksaw’ – trail of blood led to disturbing bathtub scene

Police said the man then went to a nearby deli, pointed a gun at a worker behind the counter and told him to call 911, saying he was going to a hospital to shoot it up.

Shortly after, the man briefly entered Mount Sinai Medical Center before leaving and placing a firearm on the ground, police said. He then went back inside, where he told a a police officer working a paid security job that he had a gun, police said.

Members of the NYPD crime scene unit place evidence markers in the area of Madison Avenue and East 95th Street Members of the NYPD crime scene unit place evidence markers in the area of Madison Avenue and East 95th Street (Image: Kyle Mazza/Shutterstock)

When the officer tried to escort him out, they struggled, the man retrieved his gun and the officer called for backup, police said.

The man then walked down the street and encountered police officers in vehicles. Rivera said the man immediately fired his gun at the officers when they got out of their vehicles. The officers returned fire and hit him, he said.

“Every day, our officers put on their uniforms and they encounter dangerous situations across this city. But it’s another kind of danger when someone goes into a deli and hospital with a gun and opens fire directly at the NYPD,” Rivera said.

Rivera didn’t provide details about the man.

Sign up to our FREE newsletter and get the top stories to your inbox

DAILY NEWSLETTER: Sign up here to get the latest news and updates from the Mirror US straight to your inbox with our FREE newsletter.