By Richard Esposito, Matthew Cole and Nick Schifrin
The suicide bomber who killed seven CIA officers in Afghanistan was invited onto the heavily guarded base as a possible informant and, in a breach of security procedure, wasn't searched, according to three current and former CIA officers.
The bomber was escorted to the gym on the fortified complex known as Forward Operating Base Chapman for a meeting with a senior CIA debriefer, according to intelligence sources familiar with the incident.
When the bomber, who was dressed in an Afghan military uniform, arrived in the gym, he blew himself up, killing seven and seriously injuring an additional six officers who had gathered there to wait for him.
The attack targeted some of the CIA's most important assets in the fight against the Taliban and al Qaeda, officers who collected intelligence and conducted paramilitary operations in both Afghanistan and Pakistan. While it's unlikely the officers spent much time in Pakistan, they almost certainly contributed to the targeting of the drone program that has targeted al Qaeda's senior leadership living in the Pakistani tribal areas.
"This is a tremendous loss for the agency. The agency is a relatively small organization, and its expertise in al Qaeda is even a smaller subset of that overall group," says Michael Scheuer, the former head of the CIA unit that searched for Osama bin Laden. "We collect information that enables the military to go after our primary targets or to better defend itself. So to the extent we lose the ability to do that -- the experienced personnel to do that -- it harms not only the agency, but it harms the ability of the military to operate effectively in the area."
It was the single worst attack on the CIA since 1983, when eight officers died in the Beirut embassy attack.
In a letter sent to CIA employees today, President Obama praised the "decades of service" from the men and women of the CIA.
"These brave Americans were part of a long line of patriots," Obama wrote. "The United States would not be able to maintain the freedom and security that we cherish without decades of service from the dedicated men and women of the CIA."
CIA Director Leon Panetta said in a message to employees, "Those who fell yesterday were far from home and close to the enemy, doing the hard work that must be done to protect our country from terrorism. We pledge to them and their families that we will never cease fighting for the cause to which they dedicated their lives, a safer America."
"Yesterday's tragedy reminds us that the men and women of the CIA put their lives at risk every day to protect this nation," Panetta said. "Throughout our history, the reality is that those who make a real difference often face real danger."
To pay tribute to those who lost their lives, Panetta requested that the flags at CIA headquarters be flown at half-staff.
It was the worst day for the CIA in terms of loss of life since the war in Afghanistan began eight years ago. The attack appears to have been the result of a lapse in security, and perhaps the only time when a suicide bomber actually blew himself up inside a U.S. facility.
Deadly Week in Afghanistan
The area of the attack is near a Taliban stronghold where insurgents who use Pakistan as a base flow easily back and forth across the border. Militants in the area are led by the family of Jalaluddin Haqqani who U.S. officials say is responsible more than any other insurgent leader for attacks on U.S. soldiers.
Khost Province has suffered from multiple attacks, including suicide bombings near the main U.S. military camp called Solerno. In May and June, attacks in Khost City and outside Solerno killed at least 21 civilians, most of them Afghan day laborers.
But the terror attack was directed at a non-military camp and appears to be the deadliest against U.S. civilians since the start of the war. In August, 16 civilians died in a helicopter crash in Kandahar, but that was the result of mechanical failure.
ABC News' Kirit Radia contributed to this report.