Wednesday's attack on a U.S. compound in Afghanistan devastated what has been a hub of counterterrorism and intelligence operations for the spy agency.

Seven Central Intelligence Agency officers and contractors were killed and six more wounded in the homicide bomb attack at Forward Operating Base Chapman, CIA Director Leon Panetta said Thursday, the second-largest single-day loss for the spy agency in its history.

Among the casualties was the agency's base chief, former intelligence officials said. There had been only four publicly acknowledged CIA fatalities in Afghanistan prior to this attack.

The Taliban claimed responsibility Thursday for the bombing, which was carried out by a suicide bomber wearing an Afghan National Army uniform. Some senior officials think the bomber may have been given access to the base because he was believed to be an informant, said two former intelligence officials.

Several former intelligence officials described the attack in Afghanistan as "devastating" to the agency. A number of the officers killed had been counterterrorism operatives since before the 9/11 attacks.

The loss of seven officers is significant for a relatively small agency whose workforce is estimated to be 10,000 or more, but it's all the more damaging because those lost represented so much collective experience.

They were "experienced frontline officers and their knowledge and expertise will be sorely missed" and not easily regenerated, said Henry A. Crumpton, who led the CIA campaign in Afghanistan in 2001 and 2002.

The number of casualties in Wednesday's attack was second to those sustained in the Beirut embassy bombing in 1983, which killed eight CIA officers. The Beirut bombing hit the agency's Middle East group hard, and was one of the key events that drove the creation of the CIA's Counterterrorist Center a few years later.

"It will mark this generation the same way Beirut marked mine," said Ron Marks, a 16-year CIA veteran, who left the agency in 1999. With CIA officers deployed to the far reaches of Afghanistan and Pakistan for extended periods, he said, the agency has been lucky to have avoided such attacks for as long as it did.

It could also sow mistrust between CIA officers and the Afghan operatives with whom they work closely, another former agency officer said. ""This is a huge blow to the agency. It's a close-knit group," the former officer said. "They're not going to know who to trust now."

The base was located in Khost province, a hotbed of militant activity and a stronghold of the Haqqani Network, one of the most hardened and dangerous militant groups, which fought for a decade to wrest the area back from the Russians

The CIA's Khost base was established in the months after the 9/11 attacks as the U.S. launched its CIA-led offensive against Al Qaeda and the Taliban in Afghanistan. It began as a makeshift center for CIA-Afghan operations. By mid-2002, it had grown into a major counterterrorism hub for joint operations with CIA, military Special Operations forces and Afghan allies.

Its primary role has been to run informant networks in Afghanistan and over the border, said one former agency official. "That was one of the bases where they were paying people and running people and sending them into Pakistan," he said.

The CIA's activities on the base were an open secret locally, he added, "Al Qaeda knows it and the townspeople know it and the Taliban know it."

The attack in Afghanistan came during an already difficult week for the CIA, which has taken a beating in Washington with President Obama issuing a blunt critique of intelligence failures in advance of the botched Christmas Day terrorist attack.

The brazen assault may prompt a re-examination how CIA deploys operatives into dangerous tribal regions in Afghanistan and Pakistan, and how local employees and other local operatives working with the CIA are vetted, former intelligence officials said.

"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," Panetta said in a message to agency employees. "We owe them our deepest gratitude, and 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."

Panetta credited military doctors and nurses with saving the lives of the wounded. He said the agency would not release the identities of the officers killed at this time.

"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.

President Obama also wrote to CIA employees Thursday to praise the service of officers who were killed.

"These brave Americans were part of a long line of patriots who have made great sacrifices for their fellow citizens and for our way of life," he wrote. Since the Sept. 2001 terrorist attacks, he said, "because of your service, plots have been disrupted, American lives have been saved, and our Allies and partners have been more secure."

The CIA began mobilizing against the perpetrators of the attack. "The CIA is already working hard to find those who supported the Khost attack," a U.S. intelligence official, adding "this attack will be avenged through successful, aggressive counterterrorism operations."

CIA spokesman George Little said that the attack serves as a reminder of the dangerous nature of the CIA's work. "There's still a lot to be learned about what happened," he said. "The key lesson is that counterterrorism work is dangerous. Our fallen and wounded colleagues were on the front lines, conducting essential operations to protect our country."

Click here to continue reading at the Wall Street Journal.