NEW YORK (CBSNewYork) — An off-duty NYPD detective who was seriously hurt after police said he was attacked by a man with a meat cleaver in Midtown was released from the hospital on Friday.

As CBS2’s Christine Sloan reported, the Detective Brian O’Donnell, a 16-year NYPD veteran assigned to the 19th Precinct on the Upper East Side, was greeted by a sea of blue in the hallway as he was wheeled out of Bellevue Hospital Center.

READ MORE: Long Island Mother, Son Deliver Goodie Bags To Elderly To Spread Kindness During Pandemic

Police said O’Donnell suffered a six-inch gash from his temple to his jaw in the confrontation with Akram Joudeh, 32, Thursday evening, WCBS 880’s Stephanie Colombini reported.

A short distance from Madison Square Garden and Penn Station Thursday afternoon, gunfire had people running for cover. They were running not only from the bullets, but from the man swinging around the meat cleaver, as 1010 WINS’ Juliet Papa reports.

O’Donnell was off duty when he finally helped take down the suspect, and the cleaver went right through his face when he did.

O’Donnell was left with a 6-inch gash to his face and was stitched up next to his eye. His hand was also in a cast, broken from tackling down the suspect.

“This detective has a reputation that precedes him as someone who likes to get involved,” said Detectives Union President Michael Palladino.

The chain of events began near 30th Street and Broadway when officers responded to a call of a possible crime in progress.

Police said they found Joudeh trying to remove an immobilizing boot from his parked vehicle. At some point after officers arrived, police said Joudeh pulled out an 11-inch meat cleaver and started running.

PHOTOS: NYPD Officer Attacked With Meat Cleaver

“As we are pursuing him, and we have video of the incident, he has the cleaver in his hands and you can clearly see it and he’s waving it around,” said NYPD Chief of Department James O’Neill.

Investigators said a sergeant used a Taser on Joudeh, but it had no apparent effect and Joudeh kept going, mounting the front grille of a responding marked police car.

“I looked ahead of me and saw an individual with a very large meat cleaver brandishing by his heart. Officers directed him to drop weapons several times,” witness Jonathan Schneier said. “It was a tense situation.”

At that point, O’Donnell tried to subdue the suspect and that’s when police said Joudeh lashed out at the detective with the meat cleaver.

Sloan asked Palladino if O’Donnell had described what was going through his mind at that moment.

“What he was concerned about, really, is the citizens that he’s sworn to protect,” Palladino said. “Here’s someone running down the street with a meat cleaver, and that means that there’s thousands of potential victims in harm’s way.”

Palladino said O’Donnell identified himself as an officer to Joudeh, but Joudeh went on to attack.

O’Neill said officers then opened fire, striking Joudeh at least twice.

“They shot until the threat was stopped,” he said.

Troy Roberts was manning his sports memorabilia stand on West 32nd Street when the chaos unfolded. He told CBS2’s Tracee Carrasco what he experienced.

“All of a sudden, ‘Boom, boom, boom!’ — six, seven, eight shots,” Roberts said. ‘So I said, ‘Oh my God,’ and we went down and I said, ‘Yo, stay down! Stay down!’”

Joudeh was taken to the hospital in critical but stable condition, police said.

READ MORE: NYPD Defends Use Of No-Knock Warrants After Criticism Of Recent Incidents

Police said Joudeh’s last known address was in Queens, but they believe he was living out of his car at the time of the incident.

They said he also has 15 prior arrests, including one for menacing with a knife.

Police said Joudeh was arrested with two knives in his car when he was picked up for menacing outside a Brooklyn synagogue this past July. In 2010, he was arrested for possession of stolen property, and in 2011 for drug possession.

Outgoing Police Commissioner Bill Bratton, who is retiring Friday, said O’Donnell suffered a “very significant injury” but was “in good spirits” when he visited him in the hospital Thursday night.

Bratton also commended the bravery of the officers involved and said he believed the officers acted appropriately.

“We have a character running down the street, waving a cleaver,” he said.

Two other officers suffered non-life-threatening injuries in the attack. It’s unclear how they were hurt.

Mayor Bill de Blasio and other NYPD officials also met with the injured officers.

“Deeply grateful all in good spirits, considering,” de Blasio tweeted Thursday.

O’Donnell’s neighbors on Long Island, some in tears, were not surprised that he got involved.

As TV 10/55 Long Island Bureau Chief Richard Rose reported, retired Nassau County police Officer Charles Roby lives across the street from O’Donnell.

“I know he has three young sons over there. I get emotional,” said neighbor Charles Roby. “He was on his way home. He could have easily just went into the train station and got on the train, and said, ‘Well let the other guys handle it.’”

Roby said O’Donnell would have been justified in using deadly force against the suspect.

Meanwhile, the incident itself left some New Yorkers on edge.

“So much crazy stuff has been happening these days,” Midtown worker Michael Evans told CBS2’s Andrea Grymes. “It seems like a lot of stuff is out of control.”

“To think the holidays are almost here, it’s going to be even more congested around here,” said Andrea Morgan, who also works in Midtown. “It leaves you a bit unsettled, absolutely.

MORE NEWS: Momentum Builds Among Lawmakers To Repeal SALT Cap

O’Donnell will have to go back to the hospital to make sure he does not have permanent nerve damage. For now, he is spending every minute he can with his wife and children.