When terrorists toppled the World Trade Center on Sept. 11, 2001, the New York Police Department vowed to take extraordinary measures to prevent the next attack.

“We couldn’t just say, ‘Well, we’ll let the federal government take care of it,’ ” said Deputy Commissioner Paul J. Browne. “When you have 3,000 New Yorkers murdered, you can’t say, ‘We’re going to defer that whole responsibility elsewhere.’ ’’

In the past decade, the NYPD has built up a smothering anti-terrorism apparatus, with more than 1,000 officers working counterterrorism, radiation detectors installed in the city and detectives assigned to 11 locations overseas.

The powerful police presence, unprecedented in a U.S. city, has led to periodic rivalries with the federal agency charged with protecting Americans from domestic attacks: the FBI. Those tensions have flared twice recently, including when an FBI-led task force questioned the evidence against two men charged in May by state prosecutors with telling an NYPD undercover detective about their desire to attack synagogues.

This week, New York City officials held a news conference to announce the arrest of Jose Pimentel, an accused al-Qaeda sympathizer charged with plotting to bomb police and post offices and U.S. troops returning home. Missing from the tableau were the federal agents and prosecutors who typically lead major terrorism probes. That’s because the FBI-led Joint Terrorism Task Force, in consultation with the Manhattan U.S. attorney’s office, decided the case was not currently prosecutable in federal court.

In interviews, federal law enforcement officials expressed doubts about Pimentel’s capacity to carry out an attack and the strength of the case, which is being prosecuted by the Manhattan district attorney’s office. They said Pimentel had been under the influence of narcotics and that a police informant — who allegedly accompanied Pimentel as he bought bombmaking supplies — had participated in the plot. That, they said, made it possible for Pimentel to argue that he was entrapped.

The officials, who spoke on the condition of anonymity because the investigation is ongoing, said the case reflects a broader frustration among some in the FBI. Although NYPD personnel assigned to the FBI’s task force concurred with the decision about Pimentel, they said, the NYPD’s Intelligence Division took the case to the district attorney.

“There are always going to be tensions because agencies are made of human beings,” a federal agent said, “but is the solution to carve out a piece of your agency and start autonomously working terrorism investigations? What sense does that make?’’

A second federal agent said: “The [NYPD] intelligence division is an empire unto itself, and one hand doesn’t necessarily know what the other is doing. They’re trying to have it both ways, and that is flat-out wrong.”

But the second agent added that in the Pimentel case, “in a sense, the system worked. The case didn’t disappear, and nobody got hurt.’’

Browne, the NYPD deputy commissioner, rejected the criticism and said local officials are confident the case is strong. He said that police used at least four confidential informants and undercover police officers over 31 months of interactions with Pimentel and that separate witnesses “heard and saw [Pimentel] talk, then act in building bombs to kill Americans.’’

“These critiques are trying to undermine a success,” Browne said. “We had someone making a bomb and saying they were going to blow it up in New York City. The NYPD is intent on stopping that, regardless of how it’s prosecuted.’’

He said that police give the FBI -led task force first crack at terrorism leads and that the overall relationship between the two agencies, although it has endured some “rough spots,” is “much improved recently.”

“We are adding value, big time, in terms of counterterrorism,” Browne said.

Joan Vollero, a spokeswoman for the Manhattan district attorney’s office, declined to comment, as did Ellen Davis, a spokeswoman for Preet Bharara, the U.S. attorney in Manhattan.

FBI-NYPD relations, vital to protecting the nation’s largest city, are by no means dysfunctional. Officials in both agencies say they work together smoothly in most instances, including the investigation of last year’s failed Times Square bomber. It is also not unusual for federal and state officials to consult and decide to prosecute a case in one jurisdiction or another.

In the Pimentel case, the FBI-led task force “was consulted, and the decision was made to bring the matter to the Manhattan district attorney’s office for prosecution,” said Supervisory Special Agent Timothy Flannelly, a spokesman for the FBI’s New York Field Office.

Paul Bresson, a Washington-based FBI spokesman, said the overall FBI-NYPD relationship is strong. “In the big picture, we both understand that the threat remains very real, the stakes are high and we have to get it right every day. So we work together regularly,” he said.

“But you want law enforcement agencies at all levels . . . to not only work together but to see things through different lenses. That’s healthy,” Bresson said.

Tensions over the NYPD’s counterterrorism role date to when Police Commissioner Raymond W. Kelly launched it not long after Sept. 11, 2001. The FBI froze Kelly’s department out of two New York-related terrorism investigations, officials said in 2008, and initially would not let NYPD detectives on the FBI task force read the bureau’s case files.

“People have information, and they want to control information,” Kelly said in a 2008 interview. In September, Kelly told CBS News’ “60 Minutes”: “We couldn’t rely on the federal government alone. I believed that we had to create our own counterterrorism capacity.”

Pimentel, 27, has pleaded not guilty to several terrorism-related offenses. He was constructing a pipe bomb and told a detective that Islamic law obligates Muslims to wage war against the United States, court documents said.

Lori Cohen, an attorney for Pimentel, said that she will mount “a zealous defense” and that “it is interesting that the FBI decided not to go near this case.”

Federal officials said that decision was not the FBI’s alone and that if state prosecutors had also taken a pass, they would have monitored Pimentel to make sure he wasn’t a threat.

“Would we have picked it up and prevented something bad from happening at all costs? Absolutely,’’ said one federal official, who spoke on the condition of anonymity to discuss internal deliberations.

Staff researcher Julie Tate contributed to this report.