
UPPER EAST SIDE, Manhattan (WABC) -- Surveillance video captured the moments before a man, who shot at police on the Upper East Side, was killed when officers returned fire on Thursday night.
The incident spanned multiple locations, beginning around 7 p.m. at 1590 Madison Ave., where a 20-year-old suspect, identified as Elijah Brown, was seen on an elevator inside the residential building.
NYPD officials say he began speaking to a man in the elevator, pulled out a firearm and pointed it at the man until the elevator got to the first floor and both men exited.
"He pulled out the gun and the old man said, 'please,' you could see him saying please... he put his hand. And thank god it stopped on one and the guy walked out slowly. And the old man went right behind him," said a resident named Holly.
Surveillance video shows Brown walking on Madison Avenue with a gun, behavior the 20-year-old's family said is completely foreign.
"My cousin wasn't just another young kid or troublemaker, he was going through something, everybody goes through things, the family is still trying to figure everything out right now, and we're just trying to stay strong for the family," said Brown's older cousin.
After exiting the residential building police say Brown then entered a deli at 1600 Madison Ave., pointed a gun at a worker behind the counter, and told the worker to call 911 while threatening to shoot up a hospital.
Muhsin Alsadi can rest his head tonight after the gunman held up his brother inside their deli -- his phone was taken, but not his life.
"Thank God he was safe. All I thought about was that he was safe and that was all. Didn't really care about what happens after. As long as my brother was safe, that was the only main problem in my head," said Alsadi.
Minutes later, police say Brown entered Mount Sinai Hospital, then exited and placed his firearm on the ground next to a tree.
They say he then reentered the hospital, where he encountered an off-duty NYPD officer working security detail.
As the officer attempted to escort the suspect out of the hospital, a brief struggle ensued.
"It's a good thing that this person come from the emergency room where the weapons detector is there and we have NYPD there. At other entrances - we don't have such security. If this man had gone at another entrance - we don't know what would have happened," said emergency nurse Gueldye Beaubrun.
Brown then allegedly retrieved the gun next to the tree while the officer called for back up and followed Brown, who fled southbound on Madison Avenue.
Members of the 19th precinct encountered Brown between East 95th and 96th streets, where he fired his gun at the officers, with multiple civilians in the line of fire as they exited an MTA bus.
Officials say the officers returned fire striking Brown.
Surveillance video shows Brown turning his gun on police.

He was taken to Mount Sinai Hospital, where he was pronounced dead.
Officers were taken to the hospital for evaluation.
Police talked about how dangerous this situation was for everyone involved Thursday.
"This situation could have turned out differently. An individual walked into multiple locations with a gun, menaced multiple people with that gun, and then shot at our officers in the middle of a busy sidewalk with civilians in close proximity," said Philip Rivera, NYPD Chief of Patrol. "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 a hospital and opens fire directly at the NYPD."
Brown has no prior arrests or interactions with police.
Brown's cousin, who asked not to be identified, says the 20-year-old does not have a history of mental illness, and said he saw his younger cousin just hours before he was shot and killed by police.
"He had the phone propped up on the counter, they were on the phone laughing, that's why I don't understand... that's why it's just confusing to me," he said.
The incident is being investigated as a possible suicide by cop.
If you are experiencing suicidal, substance use or other mental health crises please call or text the new three-digit code at 988. You will reach a trained crisis counselor for free, 24 hours a day, seven days a week. You can also go to 988lifeline.org.
* Get Eyewitness News Delivered
* Download the abc7NY app for breaking news alerts
Have a breaking news tip or an idea for a story we should cover? Send it to Eyewitness News using the form below. If attaching a video or photo, terms of use apply.