The man at the center of a chaotic police shooting inside a Brooklyn subway station that injured four people last weekend chased an officer with a knife on the platform just before officers opened fire and shot him, according to NYPD body-worn camera footage the department released on Friday evening.

The footage, which family members, protesters and elected officials have been demanding for days, shows 37-year-old Derell Mickles being pursued by police in the station, onto the platform and into a subway car, before confronting an officer with a knife. He came to an abrupt stop on the platform as two officers pointed their guns at him from different directions and fired, according to the footage.

In the moments before police shot Mickles on Sunday, the footage shows the two officers repeatedly told him to drop his knife, which he refused, and he repeatedly told them to leave him alone and not touch him. The officers then attempted to Tase him, according to the footage, but he was not immobilized. Mickles is then seen running down the platform, away from one officer and toward the other, while holding a knife and pulling Taser prongs from his body.

The newly published footage shows Mickles stopping just after someone yells “shoot,” which is when both officers opened fire.

The officers, Alex Wong and Edmund Mays, fired their guns a total of nine times, according to a note at the start of the video the NYPD released. (Warning: The linked video depicts graphic violence.) The video includes footage from both officers' body cameras.

“I’m shot, I’m shot,” Mays says repeatedly to Wong after a spray of bullets is heard on the recordings. Meanwhile, Mickles falls through an open train door into the subway car as terrified passengers run away.

Mickles currently remains hospitalized and unable to walk, his attorney said on Friday. He's accused of skipping the fare and entering the Sutter Avenue L train station in Brownsville before threatening the officers with his knife.

“I don't know if that's something that's going to be permanent or temporary, but he's obviously in very bad shape as a result of being shot by the police,” lawyer Jonathan Fink said in a video arraignment for Mickles, who faces charges of attempted assault, criminal possession of a weapon, menacing and fare evasion in connection with the incident.

Mickles pleaded not guilty to the charges at the hearing in Brooklyn Supreme Court. Judge Danny Chun ordered him to be held on $200,000 cash bail, $1.5 million insurance company bond or $1.5 million partially secured bond.

The footage produced by the NYPD begins with Assistant Commissioner of Public Information Carlos Nieves reading a disclaimer and viewer discretion notice. The clips are punctuated by the NYPD’s written descriptions of what the viewer is about to see.

Fink on Friday night did not immediately respond to an emailed request for comment on the footage.

In a statement after the footage was released, Mayor Eric Adams expressed his condolences for bystanders who were harmed during the incident and his hope that they recover quickly.

“While this matter remains under investigation, the NYPD’s initial review found that this shooting took place after the suspect involved brandished a dangerous weapon and put officers’ lives at risk,” Adams said. “While the formal review continues, and out of respect for that process, I will avoid commenting any further.”

The NYPD earlier this week promised to release the footage within days. Several city councilmembers, advocacy organizations and family members of a 49-year-old bystander who was shot in the head had called for its immediate release and have questioned whether the officers' use of force was warranted.

Police officials said a 26-year-old woman was grazed by a bullet the officers had fired, and Mays, one of the officers, was also hit and injured during the confrontation. Both were reported to be in stable condition.

Adams on Tuesday praised the NYPD for showing what he called a “great level of restraint" during the incident. Police initially said they had recovered a knife from the scene, but later said it was not the knife Mickles is accused of wielding, and a man who lives in a homeless shelter took Mickles’ knife from the scene amid the chaos. Police officials on Wednesday said they had detained the man who left the station with the knife, but prosecutors declined to charge him.

Fink, Mickles’ lawyer, said at the arraignment on Friday he believed there “might be a strong argument that there was disproportionate force used by the police in this case.” He added that he was eager to see the body-worn camera footage from the NYPD.

Mickles faces seven to 20 years in prison for the charge of attempting to assault a police officer, prosecutor Steven Bravo said at the court hearing. He said that allegation and Mickles' prior “contacts with the criminal justice system” were reasons for the judge to set bail and not release the defendant on his own recognizance.

Mickles, who was wearing a hospital gown and appeared to have a bandage on his left arm, appeared conscious and alert throughout the proceeding. Hospital monitors beeped audibly in the background.

Family members of Gregory Delpeche – the bystander officers shot in the head – were among those who called for police to release body-worn camera footage of the incident.

“I believe that the NYPD was reckless in dispersing their guns in front of citizens, and I just think there should be an investigation,” Gregory Nougues, one of Delpeche’s cousins, said earlier this week.

Delpeche remained in critical condition at Kings County Hospital on Friday, where family members said doctors had to remove part of his skull to relieve swelling in his brain.

Delpeche’s relatives watched the body camera footage minutes before a press conference across from the Sutter Avenue L train station on Friday night. One family member burst into tears while watching.

His relatives described him as a law-abiding man who recently lost his mother.

“This is wrong, wrong, wrong!” Nougues shouted as he held back tears at the press conference. “There’s no reason why he should be shot — this is unacceptable and this is reckless.”

Keith White, an attorney representing the family, said they are focused on Delpeche’s recovery and are considering litigation against the city. He also said the family is calling for the immediate suspension and firing of the officers who opened fire at the station.

White said Mayor Adams has not had any direct contact with the Delpeche family since the incident. A spokesperson for the mayor said his office has been in touch with an attorney for Delpeche and was waiting for a convenient time for the family to speak with Adams.

“It is critical that such an incident on our subway system is not repeated or normalized," City Council Majority Whip Selvena Brooks-Powers and Public Safety Committee Chair Yusef Salaam said in a joint statement this week.

The Council’s Progressive Caucus had also called for the NYPD to release body-worn camera footage.

The shooting was the second NYPD shooting in 48 hours where police said they initially tried to use a Taser on a suspect but the attempt proved ineffective. Tasers have failed roughly 40% of the time since the NYPD began issuing more of the devices to its officers nearly a decade ago, according to department data analyzed by Gothamist.

This story has been updated with additional information.