The Middle East as we know it is crumbling.Civil wars rage across the region, millions have become refugees and hundreds of thousands are dead. Borders that have existed for over a century are ripe for reshaping. All of this has given rise to a major threat to Western democracies: Islamic State.Islamic State (ISIS) has filled the vacuum, seizing swathes of land once belonging to the now failing governments of Syria and Iraq. From that territory, ISIS plots massive terrorist attacks against the West.However, as dangerous an enemy as ISIS is, it can be defeated.I have spent more than 30 years fighting terrorism.As such, I have learned that while terrorist organizations excel at adapting to the realities around them, it is still possible to defeat them, so long as those who fight terrorism analyze the ever-changing battlefield, ready to change the rules of the game when necessary.What follows is a series of steps needed for the defeat of ISIS. Firstly, ISIS must be stopped from repeating its terrorist successes – not only because of the murder but also because of the media attention those attacks draw to the group. The potent recruitment tool of media coverage of attacks is even more detrimental in the long term than the deaths caused in the attack. We know this from Paris and Jakarta, both of which yielded media coverage that compensated the group for any ground lost in Iraq and Syria. The coverage of “the suffering West” is the perfect bait to lure aspiring jihadists into ISIS ranks. Media coverage of “successful” terrorist attacks – ones that lead to mass casualties – dominate the news cycle. Unfortunately, one attack serves as inspiration for the next.Secondly, Western countries must tighten their border control measures so as to prevent infiltration by terrorists. Sadly, this threat looms larger than ever as waves of refugees currently pour out of the collapsing Middle East and into the West.Granting safe haven to refugees fleeing for their lives is important and virtuous, but so is plugging the breaches through which terrorists can reach Europe. Turkey, a case in point, with its border against Iraq and Syria, sees jihadist fighters sneak in daily and must be sealed effectively. If not, for some infiltrators the next stop could be Europe.Thirdly, given that Turkey is a NATO member state securing Turkey’s border must become a NATO mission as terrorists coming in and out of the war zone can ultimately strike any other country in the West if easy passage such as we are witnessing continues.NATO has a vital role to play here.Fourthly, to defeat ISIS, the Arab-Sunni countries must be encouraged to become much more active.The fact that ISIS is losing ground in Iraq to Shi’ite forces led by Iran is not good news. Sectarian wars between Sunnis and Shi’ites are a never-ending story and a temporary Sunni setback will always be followed by an anti-Shi’ite counter-attack.We must all be clear that militias supported by Iran can be just as cruel and ruthless as ISIS, creating an incentive for more Sunni civilians to adopt the group’s jihadist ideology. A true victory over ISIS is possible only if the group is crushed by the weight of Sunni forces. Such encouragement has been proven effective in the past. A decade ago, the US made a considerable effort to create such forces among the Sunni population in Iraq. While the effort was terminated when the US evacuated the country, the effort had proven successful until that point.Getting the major Arab-Sunni states to lead the effort once more is crucial to the defeat of ISIS. If the Sunni population views the battle against ISIS as a sectarian war profiting Iran, it will be ISIS that wins the hearts of the people. For this reason, American leadership that is at once strong and smart is required, both on the ground and in the diplomatic arena, in order to change the perception that America is allied with Iran in the war against ISIS.Finally, more effort needs to be devoted to dismantling ISIS’s financial infrastructure. Oil and gas fields need to be targeted; money smuggling networks need to be eliminated; religious organizations raising money for jihadist activities need to be stopped.From the years I spent fighting terrorism, I know that “following the money” is essential to both achieving military success and preventing a rebirth of any terrorist organization.An entire range of economic steps is thus desperately needed to fundamentally change the situation in the Middle East in a way that will strengthen stable governments and make it harder for terrorists to gain ground. These steps will form the focus of my next article.This has been Part 1 of a three-part series of articles written in association with Our Soldiers Speak (www.oursoldiersspeak.org).The views expressed above do not represent the views of the IDF, the Foreign Ministry or Our Soldiers Speak. They are reflective solely of the views of the author.The author served in the IDF for over 30 years. He led military efforts against Hamas in the West Bank, first as a brigade commander and eventually as the commander of the entire West Bank region, working closely with the commanders of the Palestinian Authority’s security forces. He is a senior policy and security adviser to the organization Our Soldiers Speak. Follow it at www.oursoldiersspeak.org.