The group known as ISIS-K had long planned attacks on American personnel and others. That's one reason why President Biden said he wanted to limit the duration of the U.S. withdrawal from Afghanistan.
On Thursday, this regional affiliate of the Islamic State struck at the heart of Kabul, setting off an explosion outside Hamid Karzai International Airport and another at the nearby Baron Hotel. The attacks killed dozens of Afghan civilians and at least 13 U.S. service members.
Here's what is known about the group, which reportedly has claimed responsibility for Thursday's bombings:
The Islamic State Khorasan formed in late 2014 and operates as an ISIS affiliate in Afghanistan and Pakistan. Khorasan is a historical term for a region that includes present-day Afghanistan and parts of the Middle East and Central Asia. The group is also known as ISIS-K or IS-K.
The founding members included militants who left both the Afghan Taliban and the Pakistani Taliban.
"ISIS had sent representatives to both Pakistan and Afghanistan. They were essentially able to co-opt some disaffected Pakistani Taliban and a few Afghan Taliban [members] to join their cause," Seth Jones, an Afghanistan specialist at the Center for Strategic and International Studies, said on NPR's All Things Considered.
In a 2015 video, the group's leader at the time, Hafiz Saeed Khan, and other top commanders pledged their allegiance to Abu Bakr al-Baghdadi, then the Islamic State's leader, and declared themselves administrators of a new ISIS territory in Afghanistan.
The regional affiliate governed with a strict interpretation of Islamic law and used violent enforcement tactics, such as carrying out public executions, killing tribal elders and closing schools, according to the Center for International Security and Cooperation at Stanford University.
The two are actually enemies, as Biden noted in his televised address Thursday. Since its founding, the Islamic State affiliate has been at odds with the Taliban, which now control Afghanistan.
"Their goal really is an Islamic emirate, and they are a competitor of both al-Qaida and the Taliban," said Jones of the Center for Strategic and International Studies.
Many Taliban militants defected to join the Islamic State affiliate, and the two groups fight for resources and territory.
Their differences are also ideological, according to the Stanford center.
"The hostility between the two groups arose both from ideological differences and competition for resources. IS accused the Taliban of drawing its legitimacy from a narrow ethnic and nationalistic base, rather than a universal Islamic creed," the center said.
As The Associated Press has reported, as the Taliban sought to negotiate with the United States in recent years, many of those opposed to talks switched over to the more extremist Islamic State.
The Taliban condemned the blasts outside the airport Thursday and said the U.S. controlled the area where the attacks occurred.
Biden turned the focus back to the Taliban on Thursday, saying, "It is in the interest of the Taliban that ISIS-K does not metastasize."
As of 2017, the U.S. military estimated that it had killed 75% of the Islamic State affiliate's fighters, including some of its top leaders.
The Center for Strategic and International Studies counted almost 100 attacks by the group in Afghanistan and Pakistan by 2018, and hundreds of clashes with U.S., Afghan or Pakistani forces.
Monitors of U.N. sanctions believe the affiliate has around 2,000 fighters in eastern and northern Afghanistan but also noted that the group has had to "decentralize" after significant territorial losses.
But in a Pentagon briefing following the attacks Thursday, Gen. Kenneth McKenzie, the head of U.S. Central Command, said that "the threat from ISIS is extremely real" and that there were other active threats against the airfield in Kabul.
According to the Congressional Research Service, the group has claimed responsibility for a string of high-profile attacks, including the May bombing of a girls' school in Kabul.
But Thursday's attacks also could reveal holes in the Taliban's abilities. "What this does show, by the way, is that Taliban's counterintelligence and counterterrorism capabilities actually are somewhat limited," Jones said on All Things Considered. "They were not able to identify or stop the attack."