NEW YORK (CBSNewYork) — Authorities remained at the scene of a police-involved shooting Monday after a chaotic night in Brooklyn.

Two NYPD officers were shot after responding to a 911 call on Sunday night. The suspect, identified as 44-year-old Ridhwaan Abdur Rashid, was arrested and both officers are expected to make full recoveries, CBS2’s John Dias reported.

Police said they received the call around 9 p.m. from a man in a closet at his apartment on Hawthorne Street in Prospect Lefferts Gardens. The man reportedly said his roommate shot him in both legs.

WATCH: NYPD Officials Provide Update After 2 Officers Shot In Brooklyn

“The officers on scene, not knowing who was behind the door, turned this incident into a hostage negotiation situation,” Chief of Detectives Rodney Harrison said.

Police body-camera footage captured the seconds leading up to the shooting.

One officer says, “Did you call?” The suspect responds, “Yeah, I gave you a call.”

The officer asks, “What’s going on?”

The officer says, “You called?” The suspect responds, “Huh?” The officer then says, “Yo, yo, put the gun down.”

Bullets start flying seconds later — 26 in all, the NYPD said, including three from the suspect’s gun.

(Photo: CBS2)

The NYPD released another video that shows the incident from another angle. Officers are seen coming up the stairs and then start to retreat when the suspect pulls out his gun and starts firing. The hallway is engulfed in gun smoke.

Police also fired back.

“This incident, I’m sure everyone could understand, could’ve been a lot worse. By the grace of God, our heroic officers will be going home,” Harrison said.

Police said the first officer up the stairs turned his body and avoided a direct hit to his bulletproof vest. Instead, they said, the bullet grazed his vest and lodged inside his jacket, CBS2’s Andrea Grymes reported.

A second officer was grazed in the leg.

The suspect was not hurt.

“What last night reminds us is two things. Number one, there is no routine call. Number two, police officers have split-second decisions to make life and death circumstances,” NYPD Commissioner Dermot Shea said.

About an hour later, the NYPD Emergency Service Unit was able to get in and take the suspect into custody.

Sources told CBS2 a woman who was also in the apartment with the roommate had thrown keys out the window to the officers.

Once inside, investigators said they found three guns, including a semi-automatic rifle.

Neighbors were shocked by the incident.

“On this block, you don’t really see much happening,” said Alexander Henry. “You never know who’s next to you.”

“Cops are heroes,” Ken Dudley added. “If they hear the gunshot, they got to do what they got to do to save somebody’s life.”

“We were watching a YouTube video and then paused it, and were like, ‘Are those gunshots?'” said Kristen Dauro, a neighbor. “It’s a pretty distinct sound.”

Dauro said she and her fiance heard multiple gunshots and locked their doors.

“Like 10 or so. It was pretty crazy,” she said.

The suspect was charged with attempted murder of a police officer, attempted murder, criminal possession of a weapon, and unlawful imprisonment.

According to the police union, six officers have been shot in the last five months.

CBS2’s Andrea Grymes contributed to this report

John Dias