The so-called "caliphate" that rose from the ruins of Syria and Iraq is now on the verge of collapse. On Friday, it was dealt twin blows in Deir Ezzor in eastern Syria and Al Qaim in western Iraq. Its remaining fighters are now concentrated in a border town in Syria and a village on the banks of the Euphrates in Iraq. Their final defeat now looks imminent. ISIL exercised the power of life and death over innumerable peoples just a few years ago. It proclaimed authority over all Muslims, and threatened to upend governments and establish its rule over the whole world.
We must acknowledge the tremendous sacrifice and unyielding resolve on the part of the anti-ISIL forces in Iraq, Syria and beyond that have brought us to this juncture. Their achievement has made the world a safer and measurably better place. Congratulations, however, must not give way to complacency. Because even when ISIL is physically destroyed, the hideous ideology that animated it will continue to exert influence. Its fighters, operating in a terrain congested with terrorist outfits such as Al Qaeda and Jabhat Al Nusra, have plenty of opportunities for re-recruitment. They may even reconstitute themselves as a guerrilla force. As Colonel Ryan Dillon, spokesman for the US joint task force, has observed, ISIL fighters clearly believe that, if they can bide their time, they may be able "to devolve back into an insurgent terrorist group". "The idea of ISIL and the virtual caliphate", he warned, "will not be defeated in the near term. There is still going to be an ISIL threat".
Nations that have been on the front lines would be committing a grave mistake if they returned to business as usual or, worse still, plunged into infighting. As this newspaper has repeatedly warned, the rancour over Kurdish independence in Iraq is a costly distraction from the dangers that are far from being extinguished. Within Syria, there is an urgent need to address the causes of the chaos and carnage from which ISIL was able to profit. This means dealing with Bashar Al Assad. To leave him in place is to invite even greater unrest in the future.
Beyond the Middle East, ISIL ideas will continue to find an audience on the internet. Youngsters will continue to remain vulnerable to indoctrination by extremists through social media channels. This in turn means potential attacks by lone wolves must remain a significant factor in our assessments of security threats. Terrorism is now a quotidian fact of life. It has seeped into the vocabulary of our everyday lives. Tackling it will require a multi-pronged counter-terrorism approach. The internet, as British prime minister Theresa May has said, should no longer be allowed to remain a "safe space" for terrorist recruitment. Intelligence is our greatest asset. But it must be deployed without disrupting lives. Demonising communities must never be tolerated. We can only win the fight against terrorism by being smart, not hysterical.
Follow The National's Opinion section on Twitter