The fall last week of Raqqa, Syria, capital of the self-declared caliphate of the Islamic State extremist group, is a reason to rejoice. The mass surrender of insurgents who had vowed to fight to the death is an indicator of the state of an organization that had an impressive string of victories in Iraq and Syria. At its apogee, IS controlled land equivalent in size to the United Kingdom and reigned over 10 million people. A concerted push by allied forces has pushed IS out of all but a few remaining outposts and forced its members to flee.

This victory does not mean that the war is over, however. IS has lost a caliphate and its leaders driven underground, but it has vowed to return to its roots as a guerilla organization and take up terrorist activities with new determination. Vigilance and equal determination from law enforcement and security agencies are needed now more than ever.

IS leaders and adherents are well acquainted with the vicissitudes of war. Formed in 1999 as an Islamic militant group, it later emerged as al-Qaida in Iraq and played an important role in the chaos after the United States-led invasion of that country. The military surge in 2007 and 2008 inflicted heavy losses on the group — it was estimated that the Islamic State of Iraq, the IS predecessor, had just 700 fighters by the time U.S. forces withdrew from Iraq in 2011 — but it tapped resentments of the Sunni community after a Shiite government took power in Baghdad to sustain itself.