CLARK, Philippines - A five-month battle against Islamic State supporters in the southern Philippines that claimed more than 1,100 lives has ended following a final battle inside a mosque, defence chiefs said on Monday.
The conclusion of the conflict ended immediate fears that IS 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.
"We now announce the termination of all combat operations in Marawi," Defence 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 ."
Hundreds of local and foreign gunmen who had pledged allegiance to IS rampaged through Marawi, the principal Islamic city in the mainly Catholic Philippines, on May 23. They then took over parts of the cityusing 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 travelled to Marawi on Tuesday last week and declared the city had been "liberated", a day after the Southeast Asian leader for IS, 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, who spoke at the same briefing as Lorenzana in Clark.
Hapilon, who was on the US government's list of most wanted terrorists, was killed along with one of group's other leaders, Omarkhayam Maute, according to the military.
The militants had been able to defy the relentless bombing raids that destroyed entire neighbourhoods by sheltering in basements and travelling through tunnels, according to the military.
The military had also said its opponents hid inside mosques, and that soldiers had been ordered not to bomb or fire artillery at such buildings.
The Philippines' Muslim minority regards the southern Philippines as its ancestral homeland.
Muslim rebels have been battling in the south since the 1970s for independence or autonomy, with that conflict claiming at least 120,000 lives.
The nation's biggest Muslim rebel group, the Moro Islamic Liberation Front, is in talks with the government to end the rebellion, and its leaders regularly denounce IS.
But there are more extreme groups with no interest in peace, some of which were originally part of the MILF. Hapilon and Maute led small armed groups that declared their allegiance to IS in recent years, and they formed an alliance aimed at taking over Marawi and establishing a regional caliphate for the Middle East-based jihadists.
Duterte imposed martial law across the southern third of the Philippines immediately after the Marawi fighting erupted, saying it was needed to contain IS's influence spreading throughout the region.
When asked on Monday whether marital law would be lifted, Lorenzana said a decision had not yet been made.
US Defence 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.
Mattis praises Philippines for IS battle
US Defence Secretary James Mattis on Monday praised the Philippines for its successes in battling Islamic State supporters, as he began an Asian trip aimed at reaffirming American support for regional allies.
Mattis echoed Philippine President Rodrigo Duterte's statement last week that Filipino forces had "liberated" the southern city of Marawi, after five months of bitter urban fighting that had claimed more than 1,000 lives, even though battles have continued.
"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 the flight to the Philippines, according to an official transcript.
"It was a very tough fight as you know in southern Mindanao (the local region). And I think the Philippine military sends a very strong message to the terrorists."
Gunmen who had pledged allegiance to IS occupied parts of Marawi, the Islamic capital of the mainly Catholic Philippines, on May 23 in what Duterte said was a bid to establish a Southeast Asian caliphate there.
Hundreds of insurgents withstood a US-backed military campaign, including near daily air strikes and artillery fire, that displaced more than 400,000 people and left large parts of Marawi in ruins.
Duterte last week travelled to Marawi to declare it had been "liberated", a day after the Southeast Asian leader for IS, Isnilon Hapilon, was shot dead there.
However deadly fighting has continued, with the military reporting dozens of militants are still resisting in a small pocket of the city .
Mattis flew to the Philippines to attend a meeting hosted by Southeast Asian defence ministers at the former American military base of Clark, two hours' drive north of Manila.
The Philippines is a former American colony and the two nations are bound by a mutual defence treaty.
But relations have soured under Duterte as he has sought to build closer ties with China and Russia.
Defence ministers from Australia, China, India, Japan, New Zealand, South Korea and Russia are also scheduled to attend the two-day Association of Southeast Asian Nations (ASEAN) event.
Mattis' Asia trip, which will also take him to Thailand and South Korea, comes ahead of US President Donald Trump's visit to Asia next month.
Some American allies in the region have become wary of Trump's interest in Asia.
Mattis sought to reassure allies. "The US remains unambiguously committed to supporting ASEAN," Mattis said.