Earlier this month, the United States announced that it was launching operations to liberate the final strongholds of the Islamic State (ISIS) in Syria in what seemed to signal “mission accomplished” in the fight against global terrorism. Having finally wound down major combat operations in Iraq in late April, Washington was able to shift the focus of its offensive operations there to its fight against the terrorist group’s last strongholds in Syria and in its “geographic caliphate,” which includes parts of Afghanistan, Nigeria, and Yemen. As President Donald Trump recently said, “We’re going to be coming home relatively soon. We finished, at least, almost [all] our work with respect to ISIS in Syria, ISIS in Iraq, and we have done a job that nobody else has been able to do.”

It may appear as if a global victory over the Islamic State is near, but it is not. What U.S. policymakers never seem to learn is that when it comes to global terrorism, the mission is not yet accomplished. The Islamic State or some successor could one day return to Iraq and Syria to restore its physical caliphate. While the United States was fighting the Islamic State, other groups clearly benefited. Take, for example, the strengthening since 2011 of al Qaeda and like-minded factions such as Ahrar al-Sham and Jaysh al-Islam, among others, in northwestern Syria. Al Qaeda is seeking to reinfiltrate the ranks of Iraqi Sunni insurgents from its base in Syria. The U.S. intelligence community is already warning of a continued Sunni insurgency in Iraq, which would permit the rise of yet another extremist group in Iraq. A group calling itself the White Flags (in notable contrast to the Islamic State’s signature black flag) has surfaced in the Iraqi provinces of Kirkuk and Diyala. It’s possible that a so-called victory against ISIS may be even more short-lived than the one against its predecessor, al Qaeda in Iraq.

The United States is failing to win its war on terrorism because al Qaeda and the Islamic State represent only a fraction of the real enemy: a global movement, unified by an ideology—Salafi jihadism—that exists outside of al Qaeda or the Islamic State. The tenets of this militaristic theology justify and demand the use of violence to bring about a narrow vision of Islam. These beliefs marry the Salafi current in Sunni Islam—which seeks to return religious practice to the Islam of early Muslims—with a belief that violent armed struggle in the name of Islam is incumbent on all Muslims.

Salafi jihadism is more than just the groups’ justification for violence. The ideology brings together a global and cross-cutting network of groups, organizations, and individuals—not all of whom the United States recognizes as linked to terrorism—and it provides a doctrine that unifies efforts across regions without need for coordination. These guiding principles allow the movement to be self-organizing, which means that winning against extremist groups alone is a losing battle.

Although Salafi jihadism had been relegated to the fringes of society since the late 1980s, when the jihad against the Soviets in Afghanistan ended, by 2014, it had attained a global success that Osama bin Laden could have only imagined. By 2010, U.S. and Iraqi forces had physically reduced al Qaeda to a manageable security threat, but because the conditions that permitted the group to return were not addressed, the battered remains of al Qaeda in Iraq reconstituted and took control of Fallujah in January 2014. Al Qaeda, the Islamic State, and other groups did not arise because their ideology had suddenly appealed to the masses. They expanded and strengthened because the chaos that was unleashed in the aftermath of the Arab Spring pushed local Sunni populations into trading their support for Salafi jihadist groups in exchange for security against a greater threat—whether that threat was a general rise in crime, instability in Libya, invading forces in Yemen, some combination thereof in Mali, or, most poignantly, the Bashar al-Assad regime in Syria. The groups also offered goods and services that filled practical communal needs, and then followed through by introducing local populations to the Salafi jihadist ideology, often forcing them to comply with strict practices. Indeed, the conflicts that currently engulf much of Muslim Africa, the Middle East, and South Asia gave the Salafi jihadist movement the edge it needed to gain a foothold in these regions.

The United States is failing to win its war on terrorism because al Qaeda and the Islamic State represent only a fraction of the real enemy: a global movement, unified by an ideology—Salafi jihadism—that exists outside of al Qaeda or the Islamic State.

To reverse the tide, the United States must therefore orient its counterterrorism strategy on removing the conditions that enable the growth of the Salafi jihadist movement. This involves several tactics, some of which will break comfortable norms. To begin, Washington should shift its focus on militarily defeating specific groups and on seeking to counter the ideology to helping make Sunni communities more secure. As the experiences in Afghanistan, Iraq, Yemen, and elsewhere prove, military defeats of Salafi jihadist groups are only temporary. Both the Bush and Obama administrations rightly identified the ideology as a source of strength for terrorist groups. The Obama administration went a step further than the Bush administration’s efforts to win the “war of ideas” and made countering violent extremism, which included discrediting Salafi jihadist beliefs and improving socioeconomic conditions for Sunnis in at-risk communities, a core pillar of its counterterrorism strategy. But both leaders erred in assuming that attacking the ideology would weaken support for the groups. It was the conditions on the ground not the ideology that was driving the support.

Another important element is for the United States to recognize the ongoing competition among extremists to gain the support of Sunni communities and that it must provide an alternative to the Salafi jihadist movement. Providing Sunni communities with the means to defend themselves from external threats or offering assistance to stabilize these communities will decrease their likelihood of turning to Salafi jihadist groups for help. Extremist groups have followers in all of the jihadist hotbeds, which enables them to react quickly to developments and capitalize on opportunities as they occur. It is not plausible, nor in many cases advisable, to place Americans on the ground in all of these locales, but Washington should be cultivating and enabling able partners that will work with it at the community level. These partners may not involve the state itself, especially when the state is the source of a community’s grievances, like in Syria. To identify potential partners, American diplomats should be meeting with key leaders outside of embassy walls, as this will yield a better understanding of local dynamics and foster relations with substate actors and local power brokers. Of course, the United States should only strengthen substate actors who also support the idea of a unified, central state.

Finally, the United States should press for the redress of local communities’ political and economic grievances, especially those that have been caused by the state. In Iraq and Syria, for example, the United States should shift from hunting down Islamic State members to focusing on Sunni grievances and assisting with improving governance. The feelings of injustice among Iraqi Sunni stem from their marginalization in Baghdad, a condition that is perpetuated by Iran’s use of Shiite proxy groups to consolidate influence within the Iraqi government. It is a trend that will be affected by the upcoming Iraqi elections. Efforts should be made to rebuild damaged Sunni communities, especially in Mosul, and, more important, to prevent the labeling of all Sunni as Islamic State conspirators. Likewise, U.S. policy has effectively ignored Sunni grievances against the Syrian regime. Instead, Assad became a de facto partner against the Islamic State. Under the guise of counterterrorism, he was able to regain control of parts of the Syrian countryside as his Kurdish partners expanded into historically Sunni areas. The United States still needs to find a Sunni partner in Syria. To do so, the United States must be prepared to defend the Sunni communities against the brutal attacks of the Assad regime—not just against the use of chemical weapons but also from barrel bombs and starvation as a weapon of war.

Al Qaeda-linked Nusra Front fighters carry their weapons on the back of a pick-up truck in Arsal, eastern Bekaa Valley, Lebanon, December 1, 2015. Reuters

The call to address local grievances and rebuild governance is not new. The difficulty is in finding a way to do it at scale and without a massive military deployment. Scaling requires working through additional partners, both regional bodies and states. Coalitions and bilateral relationships will be critical to complete key tasks globally. The U.S. military should assist in enabling and in creating permissible conditions on the ground for both state and substate partners to operate. Security should not be a precondition for the implementation or delivery of humanitarian and development assistance programs.

Such strategies will inevitably require a greater acceptance of risk. Risk to personnel. Risk of bad partners. Risk of failure. The United States has lost its ability to understand and shape environments given that its personnel have retreated. The spaces that they have left behind have now been filled by Salafi jihadist groups and other actors, including Iran and Russia, which are more willing to expose their personnel to danger. Shying away from imperfect partners, including substate actors, has also enabled U.S. adversaries to step in instead. A fear of misstep and of worsening the situation has paralyzed the United States from taking action where needed to shape conflicts, allowing others, including imperfect partners, to act. It is a reality that not all partners will be perfect—they are not perfect now and their interests will diverge at some point—but the United States can always choose to end bad partnerships. Failures should be taken as lessons rather than losses, so that like the enemy, the United States can adapt and improve.

The war on terrorism will not be won by the U.S. military or other partnered military forces alone. Military actions need to support a larger effort to return security to Sunni communities and to thus open up a space to compete with the Salafi jihadist movement. American diplomats need to develop relationships with key stakeholders in order to understand their positions and negotiate conflict resolutions. Foreign assistance can play a critical role in countering the Salafi jihadist movement when applied smartly to foster legitimate, local governance or used as leverage to shape regime behavior.

It is clear that Washington’s current strategy of targeting specific terrorist groups has produced no desirable final outcomes. Although no easy recipe exists to counter the Salafi jihadist movement globally, it is important to remember these guiding principles: it impossible to defeat an ideological movement militarily, and a surefire way to lose the war on terrorism is to focus on defeating only one small facet of a movement, rather than focusing on the sum of all the moving parts. If the United States does not accept this reality, it will find itself entangled in a never-ending war on terrorism and waiting for a true “mission accomplished” that may never arrive.