President Rodrigo Duterte declared the liberation of the Muslim-majority city on Tuesday after a five-month siege, which was brought to an erupt end after the death of the militants' leaders in a firefight.
ISIS had aspirations for Mindanao as a potential location for ISIS' wadiyah, or state, in Asia, appointing the local militant leader Ipsilon Hapilon as the region's emir in 2014.
With Hapilon and fellow militant leader Omar Maute killed in the fighting to liberate Marawi, those plans appear to lie in ruins.
However, analysts say there are factors at play that mean that Islamist violence could still be wrought on the country -- perhaps in more varied and deadly ways.
A potentially fraught rebuilding process for the stricken city could send young Muslims into the arms of extremist groups and a resilient network of militants, plus plenty of safe havens around the region, means that the threat still looms large.
'Complex, adaptive systems'
The death of Maute and Hapilon means the political and military leadership of the ISIS movement in the Philippines has "essentially been neutralized," says Richard Heydarian, an academic and political analyst who is the author of "The rise of Duterte: A populist revolt against elite democracy."
"It's just a matter of time before the entire leadership is wiped out," he adds.
However, Julkipli Wadi, former dean and a professor at the University of the Philippines' Institute of Islamic Studies says it's inevitable that Hapilon and Omar Maute will be replaced as the leaders of their respective groups -- and thus as ISIS' representatives in Asia.
"Obviously it will take some time before another leader will emerge, but the pattern is clear," he says. "Another one will take over."
Rommel Banlaoi, the chairman of the Philippine Institute for Peace, Violence and Terrorism Research suggests Hapilon will be replaced by Furuji Indama -- a local militant considered his deputy.
"Based on past experiences, the death of leaders doesn't mean the end of the terror organization. They are complex, adaptive systems," Banlaoi says.
"The Marawi city siege displayed their ability to mount this kind of operation (and) exposed the limitations of government forces."
While the government reports killing more than 800 "terrorists" in Marawi during the course of the five-month occupation, there are almost certainly militants who managed to flee the battleground during that period. They will likely have disappeared into the hinterlands of the province, and may also have fled further afield.
"One of the issues with the archipelago, these guys who came out of Abu Sayyaf Group, they're very accomplished mariners, able to move around from place to place, so it's difficult to clamp down on them," Scott Stewart, Vice President of Tactical Analysis of American geopolitical intelligence firm Stratfor, tells CNN.
"They can hide on the other islands, which are mountainous and densely forested; they can even hide on Mindanao."
Philippines Defense Secretary Delfin Lorenzana said government teams were being sent to cities around Mindanao to talk to local leaders and assure that they remain vigilant, CNN affiliate CNN Philippines report
"The only way (ISIS) could do this again is if people in these areas do nothing when they see some foreign-looking people with firearms and explosives, which happened in Marawi," the minister said.
Amongst the Maute ranks were a number of foreign combatants, many of whom came from Malaysia and Indonesia, but also from as far away as the Middle East. Should any of them return home, they could bring invaluable battle experience to insurgencies in their own countries.
As many as eight foreign fighters remain holed up in the city, the military suspects. Among their ranks is, the Armed Forces of the Philippines (AFP) believes, financier Mahmud Ahmad, considered one of Malaysia's most influential jihadists and the assumed source of funding for the Marawi operation.
"He's not as strong as the other two leaders... We hope to be able to get him very soon," Col. Romeo Brawner, Deputy Commander of Joint Task Force Ranao said.
However, Stewart says that it is unlikely that many foreign militants survived the battle, and indeed the siege may have been beneficial to anti-terror organizations overseas, by gathering a hard core of fighters on one battlefield.
"I don't know how many (foreign fighters) will make it back to their home countries. This might be beneficial for Indonesia and Malaysia, attracting them into a place where so many have perished," Stewart says.
For now, though, the region's militants are "thinking of the next move," Banlaoi says. "They have difficulties in Indonesia and Malaysia due to crackdowns."
Need to avoid re-radicalization
While the military attempted to limit damage to the city with surgical strikes, their available technology didn't allow for the required accuracy and swathes of Marawi were razed during the five-month siege.
How authorities approach its rehabilitation is key to determining how the next generation of Mindanao's Muslims view the government -- as a partner or opponent -- and thus how fertile the militants' breeding ground will be as they try to replace comrades lost in the city, analysts say.
"Marawi has been reduced to rubble, very much reminiscent -- eerily reminiscent -- of what happened in Mosul and Raqqa. And you're talking about 600,000 people who have been displaced," Heydarian said.
"The room for disenchantment, the room for new recruitment is there if reconstruction is not handled properly."
Stewart agrees that the rebuilding -- for the hundreds of thousands of Marawi's residents who fled, many of whom who have spent the last five months in spartan camps for Internally Displaced People (IDPs) -- is a key component in the government's fight against terror.
"If nothing is done (to rebuild) its going to create more hostility and alienation. If it's not addressed (the extremist element) is going to fester and linger," Stewart says.
"They can't ignore the problems."
Pivot to terror attack
While victory in Marawi took much longer than expected, Duterte's government is likely to be relieved it came before the arrival of world leaders, including US President Donald Trump, for the East Asia Summit in November.
Security is likely to be tighter than ever amid fears that lingering militants, now deprived of a base, will turn to other forms of warfare.
"The Philippines does have to prepare for the next phase, and the next phase will be more spectacular terror attack plots," Heydarian says.
"They (will) try its best to show they're still alive and kicking. You can imagine what kind of things they'll be thinking about to send that message across."
The retaking of the city is, in many ways, a "Pyrrhic victory" for the government, Wadi says.
In addition to the potential pitfalls of radicalizing Muslims who see the government's response to the takeover of the city as slow and destructive, there is the potential for the militants to strike further afield.
"Now that Marawi is winding up, you could say that the potential for terrorist attacks outside of Marawi is very much possible," Wadi says.