This article is by Richard A. Oppel Jr., Mark Mazzetti and Souad Mekhennet.

ISLAMABAD, Pakistan  The suicide bomber who killed seven C.I.A. officers and a Jordanian spy last week was a double agent who was taken onto the base in Afghanistan because the Americans hoped he might be able to deliver top members of Al Qaeda’s network, according to Western government officials.

The bomber had been recruited by the Jordanian intelligence service and taken to Afghanistan to infiltrate Al Qaeda by posing as a foreign jihadi, the officials said.

But in a deadly turnabout, the supposed informant strapped explosives to his body and blew himself up at a meeting Wednesday at the C.I.A.’s Forward Operating Base Chapman in the southeastern province of Khost.

The attack at the C.I.A. base dealt a devastating blow to the spy agency’s operations against militants in the remote mountains of Afghanistan, eliminating an elite team using an informant with strong jihadi credentials. The attack further delayed hope of penetrating Al Qaeda’s upper ranks, and also seemed potent evidence of militants’ ability to strike back against their American pursuers.