ISIS’s attack in Paris has prompted calls for a reassessment of the strategy the United States and its allies have pursued in the past 14 months to, in Obama’s words, “degrade and ultimately destroy” this vicious group. If that strategy is succeeding, how could such an attack occur? GOP presidential candidates have hastened to recommend alternatives, including an escalated air campaign with higher tolerance for civilian casualties, or even the deployment of thousands of ground troops to Iraq and Syria.

The wars in Iraq and Afghanistan should have taught Americans to think twice about the understandable but impulsive pursuit of quick and decisive victories in response to murderous outrages. American attempts to reorganize the politics of other countries by the sword have foundered on nationalist resistance to outsiders, unreliable local allies, deeply embedded cultural practices, and the inherent crudeness of the military instrument. These chronic problems commend the more restrained strategy that the president has employed, which is essentially a containment strategy. Americans might like to be told that they are taking direct action that will eliminate threats once and for all. Containment is a tougher sell, because it requires patience and resilience, and does not promise a quick and easy victory. Hillary Clinton took the politically easy path when she declared at the Democratic debate on Saturday that ISIS “cannot be contained; it must be defeated.”

But no strategy bears a likelier chance of long-term success than containment, even if the exact mechanisms must be reconsidered in the wake of the Paris attacks. It is, for example, hard to see how Western ground forces can liberate the areas of Iraq and Syria currently held by ISIS, and sit on that territory for as long as it takes to ensure that ISIS is no more and that yet another terrorist organization does not rise from its ashes, with fewer numbers and less bloodshed than the original invasion and subsequent counterinsurgency in Iraq entailed. And there is no guarantee that it would work. The seeds of ISIS were planted in Iraq when its parent organization, al-Qaeda in Iraq, though battered, survived “the surge” of U.S. ground forces into the country beginning in 2007—the final and tactically most successful phase of the counterinsurgency campaign, which at its peak involved some 170,000 U.S. troops. Al-Qaeda in Iraq itself was born from the American occupation; a new occupation would produce the same kind of resistance, which ISIS or some other group could exploit.

Meanwhile, there’s evidence that containment is already working. In the military campaign against ISIS, the chief purpose of containment has been to prevent the group from gaining more territory, while weakening its hold over the territory it has seized and reducing its ability to extract resources. This has meant helping those on ISIS’s frontiers—including Iraqi and Syrian Kurds, the Iraqi central government, and Jordan—to better defend themselves. Perhaps because this strategy has been effective, ISIS now seems intent on conducting brutal and theatrical attacks abroad, and those in its gun sights must respond to the shift. The next task is to build or reinforce barriers between ISIS and its targets. American and European intelligence organizations must intensify surveillance at home and abroad; the United States and its Western allies must press regional powers bordering the territories controlled by ISIS to do more to interdict the transit of volunteers and resources and to counter the poisonous ideology that brings new followers to the ISIS banner.

At the outset of its bloody history, ISIS seemed more committed to organizing a state in the Middle East than it did to conducting terrorism abroad. A strategy that focused on military containment was a necessary antidote to its early successes. Of late, ISIS has been thwarted in its efforts to expand, and has even suffered reverses in northern Iraq and northeastern Syria, where it has tried to establish itself among non-Arab, namely Kurdish, populations. In central Iraq, Shiite militias have curbed ISIS attempts to gain a foothold in predominantly Shiite areas. When ISIS tries to fight as a conventional military, it now fails more often than it succeeds. Targeting ISIS’s oil business, an effort the United States has stepped up in the wake of the Paris attacks, has not yet dried up this source of money, but one suspects that ISIS’s revenues will suffer more over time.

The anti-ISIS coalition has clearly been less successful in two other dimensions of the strategy:  putting intelligence and surveillance barriers between ISIS’s territorial holdings and civilian targets abroad, and undercutting ISIS's ideological appeal. These are harder problems than military containment. The free movement of people and information is a defining feature of globalization. It does not take many people to conduct an attack of the kind that occurred in Paris. Those people do have to be highly motivated, however, and reducing the political commitment that comes from the spread of very poisonous ideas to small numbers of young men is a hard problem.

The United States has been quite energetic on the intelligence and surveillance front, but others closer to the fight have not done enough. Coverage of the Charlie Hebdo attacks in January 2015 revealed that the French security services simply had inadequate resources to track possible threats. This kind of shortfall probably exists across much of Europe. Moreover, the problem confronted by European security and intelligence organizations is greater than that confronted by the United States. European countries are closer to the Middle East; it is simply easier for ISIS terrorists to get there. There are large, sometimes poorly integrated Arab communities in Europe that, through no fault of their own, can provide a kind of camouflage for small numbers of conspirators. Sadly, some disgruntled members of these communities are susceptible to radical appeals, and sign up or offer succor.

Finally, Europe suffers from a simple tension: Europeans have organized their social and economic life as if the European Union were one country, but European states’ political and security life is organized as if each was still a separate, sovereign country. Terrorists (and criminals) can wander at will across a vast expanse of land and people; as they do so they move from the purview of one national-security organization to the next. European security organizations do cooperate, but there will inevitably be gaps that clever bad guys can exploit. There is no obvious answer to these three problems. That said, more resources would help, and the Europeans must invest more in the internal security aspect of the fight. And, unfortunately, the European Union may have to take a step backwards on social and economic integration, and a step forward on security integration, working more strenuously for cooperation among national police and intelligence organizations.

Turkey poses a delicate political-military problem in the fight against ISIS. It has been a consistent refrain that Turkey has not done everything that it could to monitor, much less control the transit of, volunteers to and from the Syrian Civil War—many of whom are Europeans of Arab descent. These volunteers are traveling to join any one of the many groups fighting the Assad regime, some of which Turkey supports. But, judging from published figures, thousands have joined ISIS, and some of them have subsequently returned to their home countries, trained and ready to participate in terrorist actions. The U.S. air effort against ISIS has profited from the recent opening of Turkish air bases, which facilitate strikes against the group’s holdings in northeastern Syria. So it is a delicate diplomatic matter to criticize Turkish surveillance policy. Nevertheless, without more Turkish cooperation to control the transit of potential terrorists, Western Europe will remain vulnerable, and ISIS will replenish its ranks with foreign volunteers. This issue must be confronted forthrightly.

The most intractable problem facing the anti-ISIS effort is countering its insidious ideology, which brings it new followers. ISIS styles itself an orthodox Islamist group. It is also a cult of violence. The combination draws significant numbers of people to its banner. Western secular governments cannot conceivably rebut ISIS’s religious message, since they have no religious credibility themselves. Independent Muslim theologians, regardless of their eloquence, are unlikely to be an effective counter to ISIS’s concentrated, persistent, and hateful online preaching. But one Arab state has enormous influence on the interpretation of Islam worldwide: Saudi Arabia. The country spends vast sums supporting the building of mosques and Islamic educational institutions around the world. These institutions spread an orthodox version of Islam that scholars have observed is not very far removed from the version that ISIS claims for itself. In disputes in the Middle East today, Saudi Arabia seems much more interested in attacking any trace of Iranian political influence than it is in countering ISIS. It is past time to shine a light on Saudi Arabia’s deficiency as an ally and pressure the country to use its considerable clout and resources to counter ISIS’s poisonous message. This matter should become a regular feature of public and private diplomacy.

The ISIS brand also attracts other terrorist organizations in the region to recast themselves as franchises, and to cooperate with its machinations. It’s important to remember, however, that most of these organizations predate ISIS, and owe their origins to local disputes. The greater Middle East is a riven and unsettled region; ISIS creates some of its own energy, but not all. The ISIS franchise in Egypt, which claimed credit for the downing of a Russian jetliner over the Sinai peninsula in late October, is a group that fought the Egyptian government prior to pledging its allegiance to the Islamic State, and owes its recent recruitment success in part to the ruthless repression of Islamist political organizations, militant or not, organized by the current authoritarian regime, led by President (and former general) Abdel Fatah al-Sisi. (Note that this kind of mass repression is not the same as the kind of effective, targeted internal security procedures needed to counter the group without facilitating its recruitment.) The ISIS franchise in Libya seems to have arisen from the anarchy introduced in that country by NATO’s destruction of the Qaddafi regime and the utter failure to plan for its replacement. Because these and similar groups are so deeply embedded in local struggles, destruction of ISIS “central”—that is, the pseudo-state led by the self-proclaimed caliph Abu Bakr al-Baghdadi that currently governs parts of Syria and Iraqcannot eliminate them. The reverse might be helpful, however. For example, if President Sisi were to pursue more moderate policies in Egypt, he might create a less supportive political environment for ISIS.

These responses can yield only incremental improvements. The slow and steady accretion of defensive measures and offensive successes will weaken ISIS’s capabilities and can limit its appeal. At some point, the scales will tip, and ISIS will find itself more and more vulnerable to its local enemies. This strategy takes patience and resilience in the face of the occasional, but shocking, successes that ISIS may enjoy along the way. Democratic polities prefer quick and definitive solutions to security problems. ISIS’s bloody theatricals seem tailor-made to incite Western escalation. We should not oblige them.