Despite the C.I.A.’s concerns, American officials continued to obtain intelligence from inside Jundallah, first through the F.B.I., and then the Pentagon. Contacts with informants did not end when Jundallah’s attacks led to the deaths of Iranian civilians, or when the State Department designated it a terrorist organization. Senior Justice Department and F.B.I. lawyers at the time say they never reviewed the matter and were unaware of the C.I.A. concerns. And so the relationship persisted, even as American officials repeatedly denied any connection to the group.

The unusual origins and the long-running nature of the United States’s relationship with Jundallah are emblematic of the vast expansion of intelligence operations since the terrorist attacks of Sept. 11, 2001. With counterterrorism a national priority, new players — the F.B.I., the Pentagon, contractors and local task forces — have all entered the spy business. The result is a sometimes-muddled system in which agencies often operate independently and with little oversight.

“Every agency wants to be involved in counterterrorism and intelligence now,” said Representative Rush Holt, a New Jersey Democrat who sat on the House Intelligence Committee and said he did not recall being briefed on the Jundallah matter. “We have these Joint Terrorism Task Forces everywhere, and there’s so many of these antiterrorism thrusts in our bureaucracy. There’s so much more going on.”

The C.I.A., the F.B.I., the Pentagon and the office of the director of National Intelligence all declined to comment for this article. But more than half a dozen current and former officials, who spoke on the condition of anonymity because they were not authorized to discuss it, confirmed both American involvement with Jundallah and the way it evolved. Several current officials who discussed the operation played down its significance, attributing it to lapses in oversight, rather than a formal effort to ally with a terrorist group.

Image MAKING CONTACTS Thomas McHale in Afghanistan.

At the center of the operation was Mr. McHale. Those who know him paint a contradictory picture — someone whose skill in developing sources was highly regarded by the F.B.I. but who bristled at the restrictions of bureaucracy and whose dealings with Jundallah were conducted largely “off book.”