After fighting each other for 20 years, the U.S. and Taliban are suddenly finding their interests aligned against a common enemy -- but their own bloody history stands in the way of eliminating the threat.
The blast at Kabul airport late Thursday, which killed 13 U.S. service members and at least 60 Afghans, showed the world the terrorism risks emanating from Afghanistan as American troops prepare to leave next week. After the attack, President Joe Biden vowed to strike against the extremist group ISIS-K while explaining why the U.S. is cooperating with the Taliban on the evacuation.
It's "in the interest of the Taliban that in fact ISIS-K does not metastasize beyond what it is," Biden said when asked why the U.S. depended on its longtime adversary to secure the perimeter of the airport. He added: "It's not a matter of trust -- it's a matter of mutual self interest."
Asked later if U.S.-Taliban cooperation would continue beyond the evacuation, White House Press Secretary Jen Psaki said "I don't want to get ahead of where we are."
The situation is awkward for both the U.S. and the Taliban. Each side wants to prevent Afghanistan from turning into a key staging ground for Islamic State fighters to plot global terrorist attacks, but they also find it politically unpalatable -- if not impossible -- to cooperate.
For the U.S., the Taliban's treatment of women and political opponents has spurred calls for diplomatic isolation and financial sanctions. Yet that only risks weakening the Taliban and emboldening rival Islamic extremists, undermining Biden's claim that the U.S. accomplished its mission of rooting out terrorism in Afghanistan.
At the same time, the Taliban face a dilemma: They want good relations with the international community to stabilize the country, but cooperating with the U.S. to fight Islamic State could spur a backlash that prompts more rank-and-file members to join the more violent extremist group.
"The situation is tough for the Taliban -- what will they tell their cadres who have lost lives to this cause of throwing out the U.S. invaders?" said Kabir Taneja, author of "The ISIS Peril: The World's Most Feared Terror Group and its Shadow on South Asia."
"They want no U.S. presence in any of these places," he added. "So in a sense, we are back to square one unless Biden lets this go. Whatever happens now in Afghanistan will have wider international consequences."
Islamic State Khorasan, a local franchise of the group in Iraq and Syria, was formed largely by defectors from the Taliban and Tehrik-e-Taliban, a U.S.-designated terrorist group dedicated to overthrowing Pakistan's government. While ISIS-K was nearly wiped out by both U.S. and Taliban strikes, the group is estimated to have about 2,000 fighters.
ISIS-K has been responsible for some of Afghanistan's most lethal attacks in recent years, such as targeting schoolgirls, hospitals and even a maternity ward in Kabul, killing newly born babies and pregnant women.
Biden on Thursday vowed to strike the assets, leadership and facilities of ISIS-K terrorists "at the place we choose, and the moment of our choosing." He spoke about an "over-the-horizon" capability to fight terrorism that didn't require a U.S. troop presence in Afghanistan.
Still, American success in doing that hinges largely on "how far away the horizon is" as well as the strength of local partners, according to William Wechsler, a former deputy assistant secretary of defense for special operations and combating terrorism.
"In this case in Afghanistan our local partners have just been routed and dispersed," Wechsler, now the director of Middle East programs at the Atlantic Council, told Bloomberg Television. "The longer term threat is quite troubling."
Without a presence in landlocked Afghanistan, it's unclear exactly how the U.S. would conduct strikes against terrorists. In May, the Wall Street Journal reported that Biden administration officials were looking to base forces and equipment in Central Asia and the Middle East, particularly as Pakistan -- the major staging ground for the 2001 invasion -- is now off limits.
The U.S. has a long history of conducting drone strikes against terrorists in Pakistan, a touchy subject that previously spurred protests in the country even though more than 70,000 Pakistanis were killed in attacks over the past few decades. Prime Minister Imran Khan this week cited the drone strikes "by our own allies" in explaining why he "won't let our country to be used by the outsiders."
While China also has an interest in preventing Afghanistan from becoming a hotbed of terrorism, leaders in Beijing have sided with close friend Pakistan in blocking the United Nations Security Council from listing groups targeting India as terrorists. That strategy has been risky: Chinese interests have been targeted by bombs in Pakistan, where it is financing more than $60 billion infrastructure and energy projects.
"China is perfectly okay with a level of instability in its other client, Pakistan," said C. Christine Fair, a Georgetown University professor who has written numerous books on South Asia and terrorism. "What China wants is that none of these Islamist terrorists turn their guns on China."
The Taliban's swift victory over the U.S.-backed Afghan army also served as a recruiting opportunity for ISIS-K, particularly as the lack of a central government gives room for terrorists to regroup.
Moreover, intelligence-sharing between the former Afghan government and other nations is now halted at a time when many jailed terrorists have been set free.
ISIS-K sees Afghanistan as a "big opportunity space" particularly as the Taliban demonstrate they don't yet have control of the country, said Greg Barton, chair in global Islamic politics at Deakin University in Australia.
"There's nothing the Afghan Taliban can easily do about this," Barton told Bloomberg Television. "And despite what President Biden says, there's nothing the Americans can do."