Just days after the Sept. 11 attacks, a handful of CIA officers were the first Americans sent into Afghanistan. Gary Schroen was one of them, and he recalled his marching orders.
"Link up with the Northern Alliance [rebels], get their cooperation militarily, and they will take on the Taliban," he said in a 2005 interview with NPR. "And when we break the Taliban, your job is to capture [Osama] bin Laden, kill him and bring his head back in a box on dry ice."
CIA paramilitary operations date back to the agency's founding. Yet in Afghanistan and elsewhere, these actions against the Taliban, al-Qaida and others became a defining feature of the spy agency over the past two decades. They've been marked by successes — and major controversies.
But with the U.S. military all but gone from Afghanistan, and with the Taliban rapidly gaining ground on the battlefield, the CIA faces a new set of challenges as it attempts to monitor developments in that country.
This also comes at a time when the CIA is assessing its global focus. There are calls for the agency to scale back counterterrorism efforts and devote more resources to traditional spying on major powers such as Russia and China and concentrate on threats like cybersecurity.
CIA will remain in Afghanistan
CIA Director William Burns told the Senate Intelligence Committee in April that the CIA wouldn't be leaving Afghanistan when the military did.
"The CIA will retain a suite of capabilities, some of them remaining in place," Burns said.
But he added an important caveat.
"When the time comes for the U.S. military to withdraw, the U.S. government's ability to collect and act on threats will diminish. That is simply a fact," Burns noted.
The CIA and the military depend on each other in war zones. The military provides protection that allows the CIA to operate more freely. The CIA provides intelligence that shapes military operations.
President Biden says the U.S. military withdrawal will be finished by the end of August. Just a few hundred troops are expected to remain to guard the U.S. Embassy in Kabul.
In his limited public comments, Burns has not disclosed details about CIA operations in Afghanistan. But the agency did have a significant presence throughout the country for the past 20 years, and now it's certain to be much more limited, especially in dangerous areas outside the capital, Kabul.
In the early years of war, CIA officers were able to move around to meet with sources, said Doug London, who was the CIA's counterterrorism chief in the region until he retired in 2018.
"We were able to go anywhere. I was able to drive down around Kabul or Jalalabad or Khost and just go around the town and go to a coffee shop and have tea," he recalled.
"As security became harder, we started finding ourselves behind these massive fortresses. So it's hard when you're not out and about among the people," he added.
The first American killed when the U.S. entered the Afghan war in 2001 was a CIA officer, Johnny Spann. He was one of at least 18 men and women working for the agency who have died in Afghanistan over the past two decades.
CIA critics say operations in Afghanistan, Iraq and elsewhere were plagued by serious problems. They say abusive interrogations of suspects amounted to torture, and drone strikes sometimes resulted in civilian deaths.
The drone program included targeting Taliban members hiding out in neighboring Pakistan.
"From the CIA's point of view [the drone strikes] accomplished something — the elimination of many bad actors," said Husain Haqqani, who was Pakistan's ambassador to Washington a decade ago when these strikes were at their peak.
However, "the problem is there is always some other damage that you have to deal with," said Haqqani, who's now at the Hudson Institute in Washington. "A lot of Pakistanis got angry about what they saw as sovereignty violations. The drones operated from within Pakistan, and yet the Pakistani public didn't know."
Greater emphasis on covert operations
The CIA has always had three core missions — spy to gather intelligence, analyze that intelligence and conduct covert operations.
One of the most famous covert operations was in Afghanistan in the 1980s — though it wasn't really a secret. The CIA armed Afghan rebels, or mujahedeen, which helped those fighters drive the Soviet army out of the country.
But Doug London says that historically, the CIA's emphasis was spying and analysis. The balance changed after 9/11.
"The people who favored covert action, the paramilitary options, they rose much more quickly than your traditional foreign intelligence collectors," he said. "So they very much start to shape the agency."
In a book coming out in September titled The Recruiter, London argues that the CIA should refocus on spying and analysis.
"What do we do with all these paramilitary officers? Can they be collecting intelligence against Russians, Chinese, North Koreans?" he said. "It's going to be a little bit of square pegs in round holes as you try to refashion them."
The CIA refashioned itself after the 9/11 attacks, he says, and now should do so again.
Greg Myre is an NPR national security correspondent. Follow him @gregmyre1.