Updated

After receiving a phone call direct from New York City Police Commissioner Ray Kelly following reports that federal officials were questioning the NYPD’s arrest of a terror suspect, FBI Director Robert Mueller told officials in his agency to put a sock in it.

Testifying to the Senate Judiciary Committee on Wednesday, Mueller said he "gave directions that that should not happen, and when I saw it happening again went back to give directions to have it stopped."

Mueller said he was "distressed" to see federal officials anonymously quoted in press reports "talking about another prosecutor's, another agency's investigations."

"We understand it should not have happened," Mueller said. "From our perspective, it should not have happened."

Mueller also had his deputy, Sean Joyce, talk with Kelly about the matter, Mueller said.

Last month, New York City police arrested 27-year-old Jose Pimentel of Manhattan, described by officials as an "al Qaeda sympathizer." Pimentel, charged with several state terrorism-related violations, was accused of trying to build bombs targeting police and post offices in New York City and U.S. troops returning home.

He allegedly posted a message online saying, "People have to understand that America and its allies are all legitimate targets in warfare," including "all kinds of buildings where money is being made to help fund" the wars in Iraq and Afghanistan."

At a press conference announcing Pimentel's arrest, Kelly said Pimentel had been planning for months to build a bomb, but he "clearly jacked up his speed" after a September drone strike in Yemen killed Anwar al-Awlaki, the U.S.-born cleric who had become a leader of al Qaeda in the Arabian Peninsula.

New York City Mayor Michael Bloomberg, speaking at the same press conference, said Pimentel represents the "lone wolf" type of threat Mueller has warned about as U.S. forces erode the ability of terrorist groups to carry out large-scale attacks.

But within days of Pimentel's arrest, press reports, citing "people briefed on the case," noted the FBI declined to pursue the case and cited possible weaknesses in it, including Pimentel's lack of money and other resources to carry out an attack on his own, as well as interactions with a confidential informant that included alleged drug use.

"It sounds like some people speaking anonymously who are not particularly familiar with the case are trying to undermine it," NYPD spokesman Paul Browne told The New York Times at the time. "The fact remains that the words and actions of the suspect speak for themselves."

On Wednesday, Mueller was responding to questions from Sen. Charles Grassley, R-Iowa, who said he was "especially bothered by press reports of the FBI sources pointing out weaknesses of the New York Police Department terrorism case."

"You probably know that sometimes your agency gets accused of not playing well with other law enforcement agencies," Grassley told Mueller. "I'm sure you would agree that if we're busy fighting each other we're not fighting our real enemies."

Mueller acknowledged that such a perception "has been a long-term problem with the FBI," but he said it does not recognize "substantial strides" made since the attacks of Sept. 11, 2001.

Mueller said that in the wake of the tragedy, the FBI identified 10 new priorities, including "collaboration with federal, state, local and international partners."

"We understood that we could not be successful by our own, that our success is dependent on our partner's success," Mueller said, adding that he believes organizations such as the International Association of Chiefs of Police and the National Sheriffs Association would speak highly of the FBI's work with local law enforcement.

Mueller also said he has "recognized that Ray Kelly has done a remarkable job in terms of protecting New York City from terrorists attacks, New York city being a principal target."

"These things are unfortunate, I wish they didn't happen," Mueller said of the Pimentel-related press reports, "but our relationship remains solid."

Browne, the NYPD spokesman, was not immediately available for comment.