Philippine Defense Secretary Delfin Lorenzana, left, together with Armed Forces Chief Gen. Eduardo Ano, right, reads a statement announcing the Philippine troops have captured a building where pro-Islamic State group militants made their final stand in southern Marawi city and found bodies of suspected gunmen inside Monday, Oct. 23, 2017 at the ongoing ASEAN Defense Ministers' Meeting in Clark, Pampanga province north of Manila, Philippines. The seizure of the building and the defeat of the militants would allowed the military to declare on Monday the end of the Marawi siege, which hundreds of black flag-waving gunmen launched exactly five months ago. (AP Photo/Bullit Marquez)

Philippine Defense Secretary Delfin Lorenzana, left, together with Armed Forces Chief Gen. Eduardo Ano, right, reads a statement announcing the Philippine troops have captured a building where pro-Islamic State group militants made their final stand in southern Marawi city and found bodies of suspected gunmen inside Monday, Oct. 23, 2017 at the ongoing ASEAN Defense Ministers' Meeting in Clark, Pampanga province north of Manila, Philippines. The seizure of the building and the defeat of the militants would allowed the military to declare on Monday the end of the Marawi siege, which hundreds of black flag-waving gunmen launched exactly five months ago. (AP Photo/Bullit Marquez)

CLARK, Philippines (AP) — The Philippine government declared the end Monday to the militant siege of a southern city that lasted five months, left more than 1,100 people dead and sparked fears of the Islamic State group gaining a foothold in Southeast Asia.

Speaking at an annual meeting of the region’s defense ministers, Defense Secretary Delfin Lorenzana told reporters that combat operations in Marawi were ending after troops recovered 42 bodies of the last group of militants.

“Those are the last group of stragglers of Mautes and they were caught in one building so there was a firefight, so they were finished,” he said. “There are no more militants inside Marawi City.”

ADVERTISEMENT

The siege had sparked fears the Islamic State group would influence, fund and strengthen local militant groups as it was losing ground in Syria and Iraq. The defeat of the IS-linked uprising and the deaths of its leaders have been a relief to the region.

Still, the length of the siege and the difficulty the military had in stamping it out has raised questions about the preparedness of the Philippines armed forces at a time when President Rodrigo Duterte has been suggesting his country could ditch its longtime ally the United States.

The timing of the uprising was also disastrous, coming as the Philippines plays host this year to the annual summit meetings of the Association of Southeast Asian Nations, along with the 10-nation bloc’s Asian and Western counterparts, including the United States and Australia. The two governments deployed surveillance aircraft and drones to help Filipino troops rout the Marawi militants.

Lorenzana focused on the final success in his comments Monday.

“The Philippine security forces, aided by its government and the massive support of the Filipino people, have nipped the budding infrastructure and defeated terrorism in the Philippines,” Lorenzana said.

He said the achievement shows how regional cooperation can contain the spread of terrorism. “In crushing thus far the most serious attempt to export violent extremism and radicalism in the Philippines and the region, we have contributed to preventing its spread in Asia.”

Fighting terrorism is high on the agenda of the Southeast Asian defense ministers’ meeting at the Clark freeport north of Manila. As the meetings opened, the head of the Brunei delegation expressed condolences for the loss of lives in Marawi but congratulated the Philippines for being able to liberate the city.

ADVERTISEMENT

Malaysia’s minister said the siege was a wakeup call for the region. “We have to be very careful. What happened in Marawi can happen anywhere,” Defense Minister Hishammuddin Hussein said.

Hundreds of militants, many waving Islamic State group-style black flags, launched the siege on May 23 in Marawi, a bastion of Islamic faith in the south of the largely Roman Catholic Philippines, by seizing the lakeside city’s central business district and outlying communities. They ransacked banks and shops, including gun stores, looted houses and smashed statues in a Roman Catholic cathedral, according to the military.

The fighting has left at least 1,131 people dead, including 919 militants and 165 soldiers and police, and displaced hundreds of thousands of Marawi residents. At least 1,780 of the hostages seized by the militants, including a Roman Catholic priest, were rescued. The final group of 20 captives were freed over the weekend, Army Col. Romeo Brawner said at a news conference Sunday. That left the gunmen with none of the hostages they had used as human shields to slow the military advance for months.

Last week, troops killed the final two surviving leaders of the siege, including Isnilon Hapilon, who is listed among the FBI’s most-wanted terror suspects in the world, and Omarkhayam Maute. Following their deaths, Duterte traveled near the main scene of battle and declared Marawi had been essentially liberated.

DNA tests done in the United States requested by the Philippine military have confirmed the death of Hapilon, according to the U.S. Embassy in Manila. Washington has offered a bounty of up to $5 million for Hapilon, who had been blamed for kidnappings for ransom of American nationals and other terrorist attacks.

Among the foreign militants believed to be with the remaining gunmen in Marawi were Malaysian militant Amin Baco and an Indonesian known only as Qayyim. Both have plotted attacks and provided combat training to local militants for years but have eluded capture in the south.

Lorenzana said Monday the identities of the final 42 bodies had not been determined and some were beyond recognition.