WASHINGTON — The New York Police Department’s counterterrorism chief on Wednesday defended the FBI against criticism that it failed to stop the suspected New York-New Jersey bomber when it had investigated him twice already.

NYPD Deputy Commissioner John Miller told a House hearing that, based upon his knowledge of the investigation as of now, the FBI did as much as it could at the time with suspected bomber Ahmad Khan Rahami.

“He seems like many suspects who came into contact with the system at various times and was handled to the extent that the system or the law and the guidelines under which we operate would allow,” Miller said.

“It’s not realistic to say that every time someone comes on the radar you are going to be able to follow them or their friends … for an extended time while you have investigations that are on the front burner involving people who are demonstrably dangerous,” he said.

Many members of the Homeland Security Committee pressed Miller about the FBI’s failure to flag or stop Rahami after checking on him after trips to Afghanistan and Pakistan and his father’s reporting of him to the FBI in 2014.

“They missed it,” charged Rep. Jeff Duncan (R-S.C.).

advertisement | advertise on newsday

Rep. Michael McCaul (R-Tex.), the committee chairman, held up a photo of the blood-soaked notebook police found on Rahami after the shootout and read aloud parts of it to demonstrate Rahami’s radicalization.

“He talks about the sounds of bombs being heard in the streets, praised Osama bin Laden as brother, talked about Anwar al-Awlaki, and Fort Hood, Texas. He talked about pressure cooker bombs and pipe bombs and the streets as they planned to run a mile,” he said.

Rep. Bennie Thompson (D-Miss.) raised concerns that law enforcement profiling would target entire communities.

Rep. Peter King (R-Seaford) said he didn’t consider it profiling when the FBI and New York police put undercover agents in Irish American bars to track the Westies, an Irish mob. Why not do the same with Muslims, he asked.

Miller, however, cited law and court decisions.

“We operate on information, on behavior, on actions, but we do not place undercovers, or spies, or people into the community to watch people who are engaged in completely constitutionally protected activities,” Miller said.

Miller said the NYPD has amassed a large number of names and incident reports in the 15 years since the 9/11 attacks.

King asked if the FBI would be barred from sharing that information with local police so they could be aware of them.

advertisement | advertise on newsday

Miller said based on his understanding of guidelines, it wouldn’t.