"I hereby declare Marawi City liberated from the terrorist influence that marks the beginning of rehabilitation of Marawi," Duterte said while visiting the city, on the southern Philippines island of Mindanao.
Around 20 to 30 militants remain in the city, holding about 20 hostages, Maj. Gen. Restituto Padilla, spokesman for the Armed Forces of the Philippines (AFP), said at a press conference earlier in Manila.
Fighting continues in Marawi, despite Duterte's declaration of liberation.
General Eduardo Ano, Chief of Staff for the AFP, told reporters in Marawi that since such a small number of militants remain in a small area of the city, it can be considered a law enforcement matter and mopping-up operations against those militants are now underway.
A military commander in the region said the declaration was "a strategic statement."
Bloody, protracted conflict
Parts of the Muslim-majority city had been under the control of the Islamist Maute group since a shock invasion by militants at the end of May.
In the 150 days since the Philippines army launched an operation to flush them out, more than 800 militants and 162 government security forces had been killed, said Gen. Ano said.
In that time, around 1,700 hostages were rescued, including 20 on Monday, he added.
The violence forced more than 350,000 residents to flee the city and the surrounding areas, as their homes were reduced to rubble by airstrikes and militant fire.
Images from the city show rows of burned houses, pocked with bullet holes were ISIS fighters attempted to hold back advancing troops.
Residents have been told they can't return home until the military finishes clearing the city of terrorists and explosives.
It will cost more than $1 billion to rebuild the city, officials say, according to CNN Philippines.
Key leaders killed
Hapilon was the leader of the Abu Sayyaf terror group, and was named by ISIS as the group's emir in Southeast Asia. Omar Maute was one of the two leaders of the Maute group, along with his brother Abdullah, the main militant force behind the siege.
Abdullah Maute is suspected to have been killed in an attack in September, though no definitive proof of his demise has been found. Omar's death had been reported multiple times in the past, though never confirmed.
Hapilon and Maute were killed, along with seven other militants, while attempting to exit a building at street level during a four-hour firefight, Ano said at a news conference. Maute was shot in the head by a sniper.
Their bodies were positively identified by a...
Read More: Philippines' Duterte declares liberation of Marawi from ISIS-affiliated militants


