F.B.I. Criticized Officer's Role in Terror Case The undercover New York police detective at the heart of a case against a Queens man accused in a terror plot came under criticism from the Federal Bureau of Investigation for his handling of an earlier terrorism inquiry, according to a legal document. The document was released in a news conference outside the court on Tuesday after a hearing for the Queens man, Ahmed Ferhani, an Algerian immigrant who was arrested last year on charges of planning to attack a synagogue. His lawyer, Lamis J. Deek, alluded to the criticism, involving a separate 2009 terrorism investigation, earlier in the day during the State Supreme Court hearing in Manhattan. In 2009, the detective, identified in court documents as UC 242, was investigating a group of Turkish men who discussed sending money to Gaza to buy guns for Palestinians, according to the document, a letter that the Manhattan district attorney's office filed in court recently. The office said on Tuesday that it would not comment on the letter. When the New York Police Department informed federal terrorism investigators about the inquiry, a task force led by the F.B.I. was "reportedly critical" of one detail of the police investigation: that during a meeting with the men, the detective "raised the subject of Hamas before anyone else did," according to the letter, written by a prosecutor in the Manhattan district attorney's office. The investigation involving the Turkish men had not been previously disclosed. The letter hinted at the friction between the Police Department and the Joint Terrorism Task Force as each pursues terror investigations, sometimes jointly and other times separately. In the case of Mr. Ferhani and his co-defendant, Mohamed Mamdouh, the task force chose not to participate in the Police Department inquiry. The task force also did not join a case last year against a Hamilton Heights man whom the local authorities accused in a bomb plot. The investigation into the Turkish men fizzled: one man absconded with the money, according to the letter, which was written by a prosecutor, Gary J. Galperin, adding that the man used it "for personal expenditures." Mr. Galperin, in the letter, added that the detective's involvement in the 2009 investigation had no relevance to the case against Mr. Ferhani. "We have uncovered no information that we believe would tend to exculpate defendant," he wrote. Ms. Deek said at a news conference that the F.B.I."s concerns bolstered her claim that Mr. Ferhani, 27, was later entrapped by the same detective.