The brave cop who fought off a gang of drunken vagrants inside a Lower East Side subway station without pulling his gun on them credited his military and police training for his great restraint.

“Life is precious and going to that weapon is not necessarily the first thing that we should be thinking about,” NYPD Officer Syed Ali said Thursday.

Syed, 31, who served a tour in Iraq and Afghanistan before becoming a transit-assigned cop, told reporters that he asked the rowdy group to leave the station Sunday night after a female straphanger complained that they were harassing her.

In response, several of the men aggressively stumble toward Syed as he brandishes a baton and shouts, “Stand back!” according to video of the wild melee.

“I felt a trickle of sweat go down the back of my neck and then it was just straight-up police action,” he said of the incident on the F platform at the East Broadway station.

The footage shows the Army Reserve combat veteran kick two of the men, who fall to the ground.

Another vagrant is seen trying to charge at Syed before he drunkenly tumbles onto the subway tracks.

Manhattan DA Cyrus Vance Jr. came under blistering criticism when prosecutors dropped illegal-sleeping charges against the three men and two others Monday night.

But the NYPD later admitted it never told Vance’s prosecutors about the incident when the men were busted for sleeping on the platform.

After a public outcry, three of them were arrested in the cop assault.

Syed said that he was pleased that his assailants would be held accountable. “Justice has been served,” he added.

Assistant Chief Vincent Coogan, of the Transit Bureau, commended Syed for keeping his cool.

“He kept the situation from escalating and getting worse,” Coogan said. “He did a great job that night.”

Eliseo Alvarez, 36, Juan Nunez, 27, and Leobardo Alvarado, 31, face charges of obstructing governmental administration and riot.

Alvarez faces additional charges of attempted assault, criminal possession of a weapon and menacing.

Their arraignments were pending Thursday night in Manhattan Criminal Court.