When she heard hours of recordings in which Mr. Simpson “went on and on about dying on the battlefield,” she recognized his fanaticism. Still, she said, “If you’d have asked me, I would have said he was just a talker.”

In case after case, given the perplexing task of sorting out the talkers from the real terrorists, the F.B.I. has relied on informants to tease out a suspect’s intentions. It is a tactic that many Muslims sharply criticize, saying it divides the community and undermines trust in law enforcement. In the earlier Simpson case, the infiltrator’s role went to Mr. Deng, who arrived in the United States as a refugee in 2000, settled in Pittsburgh and eventually earned a high school equivalency diploma.

In some terrorism cases, informants have posed as Qaeda operatives and egged suspects on to plot an attack, drawing the ire of defense lawyers and civil libertarians. But when the F.B.I., worried about Mr. Simpson’s association with a former Navy sailor from Phoenix sentenced to 10 years in a terror-related case, asked Mr. Deng to “get to know” him, he took the opposite tack: He said he had been raised Christian (true), had adopted Islam (false) and wanted to learn more about his new faith.

At the mosque they both attended, the Islamic Community Center of Phoenix, Mr. Deng stood out. Usama Shami, president of the mosque, said the young Sudanese man came to his attention because he did not seem to care much about Islam. He asked few questions about Islamic rituals and rarely engaged with others.

"He claimed to be a convert," said Mr. Shami, an engineer of Palestinian heritage, "but he wasn’t interested in learning the faith, and that raised our suspicions."

Another clue emerged. Observant Muslims wash before praying, and repeat it if they use the restroom at the mosque. But the imam, Mahmoud Sulaiman, saw Mr. Deng skip the washing, and so did others.

Mr. Sulaiman called Mr. Shami and other members of the mosque and warned them to be careful around Mr. Deng, saying he was probably an informant and out to get someone, Mr. Shami recalled.