Five months of military operations against ISIS supporters in the southern Philippines that claimed more than 1,100 lives has ended, defense chiefs said on Monday.
"We now announce the termination of all combat operations in Marawi," Defense Secretary Delfin Lorenzana told reporters on the sidelines of a regional security meeting in Clark, a northern Philippine city.
"There are no more militants inside Marawi city."
The conclusion of the conflict ended immediate fears that ISIS would establish a Southeast Asian base in the southern city of Marawi. But concerns remained about its longer-term intentions and capabilities for the region.
Hundreds of local and foreign gunmen who had pledged allegiance to ISIS rampaged through Marawi on May 23. They then took over parts of the city using civilians as human shields.
An ensuing US-backed military campaign claimed the lives of at least 920 militants, 165 soldiers and 47 civilians, according to the military.
More than 400,000 residents were displaced as near-daily air strikes and intense ground combat left large parts of the city in ruins.
Philippine President Rodrigo Duterte traveled to Marawi on Tuesday last week and declared the city had been "liberated", a day after the Southeast Asian leader for ISIS, a Filipino militant named Isnilon Hapilon, was shot dead there.
However the continued fighting in subsequent days raised questions over whether the city was indeed free of militants.
"The presence of the Maute-ISIS was confined to two buildings: one of them a mosque," armed forces chief General Eduardo Ano told reporters on Monday as he explained the situation in Marawi following Duterte's liberation proclamation.
"That is where the last fighting occurred and that is the place where we rescued (an) additional 20 hostages.
"In that fighting, we gave the chance for these militants and terrorists to surrender. But they fought to the last breath so we had no choice."
The bodies of 42 militants were recovered after the final battle, including two women and five foreigners, according to Ano.
US Defense Secretary James Mattis on Monday praised the Philippines for its success.
"One of the first things I'm going to do when I get there is commend the Philippine military for liberating Marawi from the terrorists," Mattis told reporters on board a flight to the Philippines to attend the security meeting in Clark.