An NYPD cop was honored Tuesday for single-handedly battling a group of hostile homeless men in a Manhattan subway station.

Officer Syed Ali got a Christmas Day visit from Councilman Chaim Deutsch (D-Brooklyn) at the NYPD Transit Task Force headquarters in Brooklyn.

Deutsch — who was photographed next to Ali, who held a commemorative plaque — hailed the cop’s “quick action to defend civilians and himself against five individuals attacking on a subway platform.”

“Officer Ali showed restraint & discipline in how he de-escalated the situation,” Deutsch wrote on Twitter.

Mayor Bill de Blasio also tweeted praise for Ali’s “extraordinary professionalism and bravery.”

“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,” Hizzoner wrote.

A video posted online shows Ali — who is an Army combat veteran with multiple tours served in Iraq, Kuwait and Afghanistan — using a collapsible baton to fight off several drunken vagrants on the platform at the East Broadway station.

The NYPD has said Ali confronted the group around 10:30 p.m. Sunday when a woman complained that they’d harassed her.

Five suspects were arrested the following morning on charges of sleeping in the station in violation of city law, but the Manhattan DA’s Office declined to prosecute them when there were hauled into court Monday night.

That move sparked outrage from the head of the Patrolmen’s Benevolent Association.

“There is no telling how much damage these mopes would have done to that courageous police officer had he not been equipped to handle them,” PBA President Patrick Lynch said.

A spokesman for Manhattan DA Cyrus Vance Jr. defended the decision, saying that the vagrants “were not arrested for attacking an officer” and that a 2016 policy endorsed by the NYPD ended prosecutions for sleeping on the floor of a subway station.