Editor's Note: Peter Bergen is CNN's national security analyst, a vice president at New America and a professor of practice at Arizona State University. He is the author of "United States of Jihad: Investigating America's Homegrown Terrorists." The opinions expressed in this commentary are his own. View more opinion articles at CNN.
(CNN) - Five years ago, ISIS reigned over 34,000 square miles in Iraq and Syria and collected billions of dollars in taxes and oil revenues as well as from looting banks.
Today, its so-called caliphate is virtually gone. And yet on Sunday, the continued influence of ISIS' ideology became gruesomely apparent: A terrorist attack, one of the most lethal since 9/11, killed at least 359 people at churches and luxury hotels in Sri Lanka.
On Tuesday Sri Lankan authorities accused a local Islamist group, National Tawheed Jamath, of carrying out the attacks.
Sri Lankan Prime Minister Ranil Wickremesinghe said, "This could not have been done just locally," and that some of the terrorists involved had traveled abroad and had foreign links.
A US official told CNN's Barbara Starr that ISIS inspired the group behind the attacks in Sri Lanka.
CNN has also learned that an ISIS suspect told Indian officials that he had trained a Sri Lankan militant who is associated with NTJ, the local Islamist group that Sri Lankan officials have blamed for the attacks.
The attacks are a terrible reminder that ISIS' ideology, which treats adherents of other religions and Muslims who don't share their Sunni extremist agenda as "infidels," was not extinguished with the loss of its caliphate.
That ideology sanctions attacks on Christians in their places of worship. ISIS murdered 20 worshippers at a church in the Philippines in January.
Last May, ISIS carried out attacks at three churches in Indonesia, killing 12 people and injuring many more.
ISIS also killed 49 people gathered for Mass at two churches in Egypt in 2017.
On Sunday we saw the ISIS lethal ideology play out again in the attacks on three churches in Sri Lanka.
On Tuesday ISIS' Amaq news channel claimed responsibility for the Sri Lanka attacks but didn't provide any proof of its direct involvement.
Whether ISIS itself was involved in the attacks or was simply the inspiration for the attacks matters little to the victims of the bombings in Sri Lanka and to their families.
The Awlaki parallel
Clearly, killing ISIS' geographical caliphate did not kill ISIS' ideas, which continue to inspire militants around the world.
The United States has seen a similar phenomenon with the ideology of the late Anwar al Awlaki, a US-born cleric who became a leader of al Qaeda in the Arabian Peninsula in Yemen.
Awlaki was killed in a US drone strike in Yemen in 2011, but even in death Awalki's ideas about the necessity of violence purportedly in the name of God continue to resonate.
The research institution New America found that since his death, Awlaki's videos had influenced more than 80 terrorists in the United States.
What to do
There are, of course, no easy answers for violence that is often enabled by hateful propaganda on the internet. One approach is to keep up pressure on social media companies to reduce as much as feasible any propaganda from violent extremists such as Awlaki or from ISIS.
This is not a simple task when you consider that YouTube has 400 hours of material uploaded to it every minute.
Certainly social media companies have become more proactive in taking down material that incites violence.
Facebook has said it had planned to hire 20,000 content moderators by the end of 2018.
More could be done, however, for instance, by applying machine learning and artificial intelligence to take down quickly any content that is designed to stir up violence.
It is also incumbent on national leaders around the world to realize that a key part of their jobs should be to reduce sectarian tensions, not to stoke them.