A group of homeless men who were captured in a viral video attacking a New York City police officer inside a subway station won’t face charges for the incident, Manhattan’s District Attorney’s Office said as the cop received praise for fending off the drunken vagrants.

The five men — identified as Oseas Garcia, 32, Juan Munez, 27, Raul Ruiz, 29. Elisoe Alvarez Santos, 36 and Leobardo Alvarado, 31 — were arrested for sleeping in the subway following the altercation involving NYPD officer Syed Ali over the weekend, the New York Post reported. Ali was seen in a 47-second video fending off the vagrants and ordering them to “stand back” while they were in a Lower East Side subway station.

“Stand back! I don’t want to hurt you!” Ali said as the men continue to push forward and throw punches.

CLICK HERE TO GET THE FOX NEWS APP

But by Monday, Manhattan District Attorney Cy Vance allowed the men to walk free despite calls to charge them.

"When people are arrested for attacking officers, we prosecute them. These men were not arrested for attacking an officer – they were arrested for sleeping on the floor of a subway station – a rules violation, not a crime,” Manhattan DA’s spokesman Danny Frost said in a statement to PIX11.

“We have not prosecuted this violation since March 2016 under a policy jointly established with the Police Commissioner and Mayor," he added.

The DA’s actions sparked backlash and questions from the public and officials. The video capturing the attack was posted on Twitter and received millions of views within days.

Patrick Lynch, president of the Patrolmen’s Benevolent Association, said it was wrong not to charge the men in the subway melee.

“The district attorney’s job is to prosecute crimes, not to act like a social advocate,” Lynch said in a statement to the New York Post. “These men chose to drink to excess and then to attack a police officer like a pack of jackals when given a lawful order to move on. They should be held accountable for their actions.”

Councilman Chaim Deutsch, who gave Ali a citation for his courageous response to Sunday night’s incident, also questioned the lack of charges.

“Why were the attackers released? Were they offered mental health treatment and shelter, or are they back out on the streets, free to assault somebody else, or worse? Many unanswered questions,” Deutsch tweeted.

Former NYPD Commissioner Bill Bratton also tweeted, “Kudos to this NY cop on his performance. His situation is a reminder to New Yorkers & their political leaders that NYC’s decline in the 70s & 80s began in the subways. The quality-of-life declines & warning signs are all there for it to happen once again.”

New York City Mayor Bill de Blasio praised Ali’s actions on Twitter, but made no mention of the dropped charges.

“What extraordinary professionalism and bravery by NYPD Officer Syed Ali. Attacking our men and women in uniform won’t ever be tolerated. The NYPD is upping its presence at this station and others to ensure officers have the support they need,” de Blasio said.

No one was seriously hurt in the incident and the men were taken to the hospital following the attack for evaluation. Several of the homeless men were reportedly spotted back at the same subway station shortly after their release.