Updated

Three of the four hero police officers credited with taking down the Port Authority terrorist are former members of the military who ran toward the scene of the pipe bomb blast as panicked commuters fled in the other direction, their union spokesperson says.

Sean Gallagher, a former Marine, Drew Preston, who served three tours with the Army in Iraq, Anthony Manferdini, a former Marine bomb technician and Jack Collins were identified by the Port Authority Police Benevolent Association on Monday as the men who restrained attempted suicide bomber Akayed Ullah.

“You couldn’t have had better people on the scene,” spokesperson Bobby Egbert told 1010 WINS.

Egbert said the officers described encountering “smoke and debris in the air” moments after Ullah detonated a homemade bomb in a passageway connecting the Times Square and Port Authority subway stations.

port-authority-1

Police officers patrol in the passageway connecting New York City's Port Authority bus terminal and the Times Square subway station. (AP)

The stations are the most heavily-trafficked in New York City’s subway system, with more than 60 million riders passing through annually. Above one of them is the Port Authority Bus Terminal, a major transit hub for riders traveling throughout the Northeast.

Manferdini was on patrol near the passageway at the time of the detonation and noticed people running out of the area, Egbert said.

He then made a radio transmission and responded with the other officers, only to find Ullah lying on the ground and reaching for his cell phone. The cops also spotted wires coming out of Ullah's jacket and running down to his pants.

“The officers at that point had to make a decision so no one else would be hurt, and they decided at that point to take the person into custody, keep him away from the cell phone,” Egbert told 1010 WINS.

Egbert said the officers told him there was a struggle to keep Ullah away from the phone, which may have been used as a detonator for the low-tech explosive.

port-authority-2

Police officers and a police dog patrol after a terrorist struck Port Authority with a homemade bomb. (AP)

A statement put out by the president of the Port Authority Police Benevolent Association Monday hailed the four men as “courageous” officers who “risked their lives confronting an armed terrorist to protect others from harm."

“These police officers are among the most highly trained police officers in the nation, as are all Port Authority police officers,” Paul Nunziato said. “I am so thankful there was no loss of life and I could not be prouder of our Port Authority police officers, their actions and dedication to their sworn duty.”

Ullah, a 27-year-old Bangladeshi national living in Brooklyn, was charged Tuesday with criminal possession of a weapon, supporting an act of terrorism and making a terroristic threat.

Federal charges are expected later, The Associated Press reported.

Prior to the blast, Ullah looked at Islamic State propaganda on the Internet and revealed to investigators he was trying to retaliate against U.S. military aggression, but had no direct contact with ISIS, law enforcement officials familiar with the investigation said.

Ullah was carrying a 5-inch metal pipe bomb attached to a battery pack strapped around his midsection, police sources told the New York Post. Other law enforcement officials told Fox News that Ullah said he made the crudely-constructed device at his job.

Ullah suffered burns in the attack while three others were left with minor injuries.

Bomb-sniffing dogs were present Tuesday morning as the passageway reopened.