Former New York police commissioner Ray Kelly—sometimes mentioned as a potential opponent to Mayor Bill de Blasio’s reelection campaign next year—praised law enforcement authorities who caught the New York and New Jersey bombing suspect Monday, but offered a sharp critique of the mayor.

Shortly after New Jersey cops arrested Afghan-born 28-year-old Ahmad Khan Rahami after a morning shootout and foot chase in Linden, New Jersey, Kelly also indicated that the de Blasio administration is too politically correct and overly sensitive to media criticism, prompting city officials to discard law enforcement tools that could help prevent future terrorist attacks.

“It was dumb, quite frankly,” Kelly said of de Blasio’s just-retired police commissioner Bill Bratton’s decision in April 2014 to disband the five-officer Demographics Unit that Kelly created in 2003 to study the social habits and locations of New York’s myriad ethnic and religious groups, especially Muslims in the post-9/11 world.

The unit, which at its height boasted 15 plainclothes detectives who frequented mosques, book stores, and restaurants in an intelligence-gathering operation, was vehemently protested as spying and religious profiling by Muslim advocacy organizations—a view supported by a Pulitzer Prize-winning series by the Associated Press in 2011.

“They were doomed to success,” Kelly said sarcastically about the AP’s reporting, which he and then-Mayor Michael Bloomberg protested at the time as unfair and wrongheaded.

“They ended it,” Kelly said of de Blasio and Bratton. “They negotiated the front-page story in The Times above the fold. It was all PR.”

He added: “They wouldn’t be doing that today.”

De Blasio’s press spokesman didn’t respond by deadline to Kelly’s criticisms on those and other subjects.

Kelly said the Demographics Unit, later renamed the Zone Assessment Unit, was designed to create a “granular” picture of New York City’s residents—who they were, what neighborhoods they lived in, how they spent their time.

“It was sort of the information that was already in the U.S. Census—but just deeper,” he said.

As for how such information could have been useful, Kelly gave the example of the Chechen Boston Marathon bombers, who as they fled law enforcement authorities hijacked a BMW and ordered the driver to take them to New York. The Demographics Unit’s intelligence—that ethnic Chechens tended to live in certain neighborhoods in Brooklyn and New Jersey—could have helped locate the criminals had they made it to their destination, Kelly said.

A physically fit 75-year-old and former Marine who saw combat in Vietnam, Kelly indicated he is unlikely to run for mayor next year.

“I’m not seriously considering it,” said Kelly, who is vice chairman of the K2 Intelligence investigative firm, a contributor to ABC News, and a distinguished visiting fellow at the Council on Foreign Relations.

In an interview at the Yale Club, after Kelly was the keynote speaker at a counterterrorism conference organized by the Tel Aviv-based Shurat Hadin Israel Law Center, he also criticized the de Blasio administration for removing from the NYPD’s website—as part of a lawsuit settlement with Muslim groups—a groundbreaking study of homegrown Islamic radicalism that he commissioned in 2007.

“You can still get it on Amazon for 15 bucks,” Kelly said about the 92-page report, titled “Radicalization in the West: The Homegrown Threat.” (Actually the current Amazon price is $19.99.)

Kelly—the city’s top cop under Mayor David Dinkins in the early 1990s and then again, from 2002 to 2014, under Michael Bloomberg, interrupted by service as the undersecretary of enforcement in Bill Clinton’s Treasury department and head of U.S. Customs—said de Blasio was too quick Saturday night to discount terrorism or a possible link to an explosion hours earlier in Seaside Park, New Jersey, after a bomb went off around 8:30 p.m. in Manhattan’s Chelsea neighborhood, injuring 29 people.

“It was too early. We still didn’t know,” Kelly told The Daily Beast about de Blasio’s statements on live television a few hours after the Chelsea bombing, adding that Hizzoner “should have been more prudent… We don’t know what [Rahami’s] internet activity was. We don’t know what his phone activity was or his phone records. That’s something they’re going through now. It’s premature.”

Kelly was equally dubious about de Blasio’s assertion that “there’s no other individual we’re looking for at this point in time” during Monday’s City Hall briefing, at which an FBI official asserted that there’s “no indication” that the 28-year-old Rahami is part of a terror cell.

“They always have these elected people who want to downplay the potential threat,” Kelly said as additional details of the investigation into Rahami’s actions were revealed as the story rapidly unfolded. “It’s his [de Blasio’s] watch, so now he wants to.”

Kelly said city officials were too quick to discount terrorism in the Central Park explosion last Fourth of July weekend that resulted in a young tourist losing his left foot. The NYPD initially identified the likely culprit as an experimenter or hobbyist.

Later, however, the improvised explosive device, placed in a shopping bag, was discovered to have been activated by TATP, a homemade chemical mixture long favored in terrorist attacks, including the explosives used in last fall’s attacks in Paris.

“TATP is an explosive made from acetone and peroxide,” Kelly said. “It’s made out of widely available chemicals and it’s very volatile, and they only identified it two weeks after the event as being TATP. But by that time, the media didn’t care about it… A lot of questions should have been asked first” before the more benign non-terrorism explanation was disseminated. “This could have been a test of some sort” in preparation for a full-scale attack.

Asked if he believed city officials had been “too PC,” Kelly answered with a chuckle: “I think we’ve been that way for a while.”

During a briefing on Monday, de Blasio reversed himself on his Saturday night declaration to reporters on the Chelsea sidewalk that “there’s no evidence at this point of a terror connection,” and “at this moment, we do not see a link to terrorism,” and “there was no specific evidence of a connection” to the bombs discovered in New Jersey—assertions that haven’t stood the test of two days.

“Based on the information we have now, we have every reason to believe this was an act of terror,” de Blasio said, adding that “vigilance is called for.”

(Presumably, Hizzoner wasn’t referring to the just-released paperback edition of Kelly’s best-selling memoir, Vigilance.)

In Kelly’s remarks to the counterterrorism conference, he gave his audience a detailed timeline of the multi-agency investigation of the bombings in New York and New Jersey—which he later said was based on his own sources along with publicly available information.

“They traced the flip phones [found on the Chelsea devices] very quickly to an individual living in New Jersey,” Kelly said. “By the way, his fingerprints were on the bomb… The investigators did a good job in speeding the investigation.”

Luckily, Kelly added, Rahami’s “tradecraft was very bad.”