Editor’s Note: Radical Islam is not a monolith. The Lebanese Hizballah fights the Islamic State in Syria, Hamas has crushed al-Qaeda sympathizers in Gaza, and—most importantly from a U.S. perspective—al-Qaeda and the Islamic State are bitter rivals. This tension shows up in Afghanistan, one of the most important U.S. theaters of war. Seth Jones of the RAND Corporation details how a surprising source contains the Islamic State there—the Taliban.

***

Since 2014, the Islamic State has established a small presence in Afghanistan. Islamic State leaders call this province, or wilayat, “Khorasan,” a reference to the historical region that encompassed parts of Iran, Central Asia, Afghanistan, and Pakistan. Yet despite their effort to expand power and influence in the region, the Islamic State-Khorasan Province, as Islamic State leaders refer to the affiliate, controls virtually no territory except for tiny areas in such districts as Deh Bala, Achin, and Naziyan in the eastern province of Nangarhar. The Islamic State has conducted only a handful of attacks in the region, failed to secure the support of most locals, and struggled with poor leadership.

The Afghan Taliban has emerged as one of the Islamic State’s fiercest enemies, though the U.S. and Afghan governments have conducted strikes as well. Taliban commanders have orchestrated an aggressive campaign against the Islamic State to kill its senior leaders, co-opt its members, and undermine its ideology. This development is a double-edged sword for the United States, with broader implications in the campaign to unseat the Islamic State from territorial control in the Middle East, Africa, and Asia. The weakening of the Islamic State is a positive step. But Taliban successes against Abu Bakr al-Baghdadi’s organization have increased the Taliban’s strength in eastern and southern Afghanistan, creating a separate challenge for the United States and its allies.

The Rise of the Islamic State in Khorasan

In 2014, Islamic State leaders communicated with militant groups in South Asia to gauge the possibility of expanding the Islamic State’s influence in the region. The Islamic State began conducting an information campaign through word of mouth, printed material, and other forums. Islamic State sympathizers, for example, distributed a 12-page printed booklet titled “Fateh” (or “victory” in Pashto) in Pashtun areas of Afghanistan and Pakistan. As Tehreek-e-Taliban Pakistan spokesman Shahid Shahidullah remarked in late 2014: “Oh our brothers, we are proud of you in your victories. We are with you in your happiness and your sorrow … All Muslims in the world have great expectations of you. We are with you, we will provide you with mujahedeen and with every possible support.”

South Asia seemed a promising market for the Islamic State. The region has a long history of supporting jihadist groups, dating back to the anti-Soviet wars in the 1980s. South Asia also had several factors that made it attractive for Islamic State leaders: relatively weak governments, which provided an opportunity to secure safe havens in areas with little or no official interference; ongoing wars backed by Western countries like the United States, which could be used to delegitimize the governments in Kabul and Islamabad as foreign puppets; and a religious and historical importance as part of Khorasan. The Islamic State launched a blistering public attack against al-Qaeda and the Afghan Taliban, accusing them of having gross shortcomings regarding the teaching of tawhid (the oneness of God) to their members. The Islamic State accused both the Taliban and al-Qaeda of multiple offenses: focusing on tribal law over Sharia, establishing a close alliance with Pakistan’s intelligence agency, failing to effectively conquer and control territory, neglecting to target Shi’a, adopting “un-Islamic” practices such as wearing amulets, establishing a hierarchical structure that excluded many rank-and-file fighters, and recognizing international borders (instead of supporting a pan-Islamic caliphate).

One of the few groups that escaped the Islamic State’s excoriation was the Tehreek-e-Taliban Pakistan, which was formed in December 2007 as an umbrella organization among various Pakistani militant groups. “They were upon great good,” concluded one article in Dabiq, the Islamic State’s online magazine, referring to the Tehreek-e-Taliban Pakistan. “They carry the Salafi creed and hope and strive to establish the laws of Islam in their region.”

The Islamic State’s Strategy

In January 2015, the Islamic State formally announced the establishment of what it called “Wilayat Khorasan,” or Khorasan Province, in Afghanistan and Pakistan. Over the next several months, the Islamic State focused on co-opting local militants and expanding its networks in Afghanistan and Pakistan. Its strategy included several components.

First, the Islamic State attempted to exploit local grievances in leveraging already-established networks. Following the death of several Tehreek-e-Taliban Pakistan leaders, Hafiz Saeed Khan and several of his colleagues in Pakistan became increasingly disenchanted with the group. Saeed had apparently been one of the main contenders for the Tehreek-e-Taliban Pakistan’s top spot, but was passed over. In southern Afghanistan, Abdul Rauf Khadim was a longstanding Taliban military leader who rose to prominence after the United States released him from Guantanamo Bay, Cuba, in 2007. Yet he became increasingly disgruntled with the Afghan Taliban. The Islamic State recruited some of these frustrated former Tehreek-e-Taliban Pakistan and Afghan Taliban members, as well as operatives from the Islamic Movement of Uzbekistan.

Second, the Islamic State headquarters in Syria and Iraq doled out some money to attract supporters. The Islamic State was willing to provide some finances—perhaps as much as several hundred thousand dollars—to build networks in South Asia. The Islamic State’s seizure of territory in Iraq and Syria attracted some extremists in the region, who wanted to ally with what they viewed as a successful violent jihadist group.

Third, the Islamic State took advantage of weak local governance to establish a foothold. Nangarhar Province in Afghanistan is perhaps the clearest example. Both the Afghan government and Taliban had failed to control territory in parts of Nangarhar. The Afghan government and its security forces had virtually no presence in most parts of districts along the Spin Ghar mountain range south and east of Jalalabad. And the Taliban had little control in an area that included multiple insurgent groups and fractured tribal dynamics. In such districts as Achin, Deh Bala, and Naziyan, the Shinwari tribal structure has almost completely broken down.

Based on this strategy, the Islamic State established an organizational structure led by an emir, with a deputy emir and a central shura composed of such committees as intelligence, finance, propaganda, and education. After the death of Hafiz Saeed Khan in 2016 by a U.S. drone strike, the Islamic State appointed Abdul Hasib, a former Afghan Taliban member, as emir of the organization.

The Decline of the Islamic State

Despite its best efforts, however, the Islamic State controls little territory in South Asia, conducted only a handful of attacks, failed to secure the support of most locals, and struggled with poor leadership.

In 2015, the now-deceased Taliban leader Akhtar Mohammad Mansour bluntly warned in a message to Islamic State fighters that the war in Afghanistan should come “under one banner” and one leadership—that of the Taliban.

One of the Islamic State’s fiercest opponents has been the Taliban. In 2015, the now-deceased Taliban leader Akhtar Mohammad Mansour bluntly warned in a message to Islamic State fighters that the war in Afghanistan should come “under one banner” and one leadership—that of the Taliban. Taliban leaders strongly objected to the Islamic State’s desire to establish a separate chain of command in Afghanistan with a separate leader, Abu Bakr al-Baghdadi. In response to Mansour’s letter, Islamic State spokesman Abu Muhammad al-Adnani (now deceased) responded by accusing the Taliban of allying with Pakistani intelligence. This war of words soon gave way to bloody skirmishes.

In eastern Afghanistan, fighting erupted between the Taliban and Islamic State in early 2015. The first clashes took place in Naziyan district of Nangarhar Province, and were followed by Taliban attacks against Islamic State positions in Kot and the Mamand Valley. In May 2015, the Afghan Taliban withdrew after failing to secure support among locals, and Islamic State forces conducted offensive operations against the Taliban in several districts of Nangarhar. By mid-summer of 2015, the Islamic State controlled territory in several districts in the province. But the Taliban regrouped. Drawing on fighters in nearby provinces, the Taliban successfully pushed Islamic State fighters out of most districts in Nangarhar, except for Deh Bala, Achin, and Naziyan. In southern Afghanistan, the Taliban routed Islamic State fighters. In the northern Helmand district of Kajaki, for example, Taliban fighters captured or killed several dozen fighters that had allied with the Islamic State in 2015. The Taliban did the same in Farah Province, where they killed, captured, or co-opted an Islamic State cell in the Khak-e-Safid district. The Taliban also brutally crushed Islamic State cells in Logar and Zabul provinces.

Broader Lessons

Today, the Islamic State has roughly 1,000 to 2,000 fighters in Afghanistan and Pakistan, a decrease from 2015 estimates. The group has conducted only a handful of attacks in the region, such as against a police convoy in Quetta in August 2016, Pakistan attorneys at a hospital in Quetta in August 2016, Hazara protesters in Kabul in July 2016, and the Pakistan consulate in Jalalabad in January 2016. But the Islamic State’s loss of territory in such provinces as Helmand, Farah, Zabul, and Logar is not entirely a good news story. The Afghan Taliban has benefited from the Islamic State’s decline. The Taliban has strengthened its power, bolstered its reputation, and complicated U.S. and Afghan government efforts to wind down the Afghan war.

The Afghan experience highlights a broader lesson in the fight against the Islamic State. The Islamic State’s loss of territory will not occur in a vacuum. Who will benefit? Other terrorist groups or non-state actors? The local government? Regional powers? As the United States and its allies undermine Islamic State territorial control in Iraq, Syria, Libya, and other countries, policymakers need to shift their attention to understanding and influencing who fills the vacuum. As in Afghanistan, the United States may not be much better off with the winners.