Six months into a protracted battle with militants besieged in the southern city of Marawi, the Philippine military appears to be on the cusp of victory.

In a speech to soldiers in the city on Tuesday, President Rodrigo Duterte was decisive: "Ladies and gentlemen, I hereby declare Marawi City liberated from the terrorist influence."

There are still clashes in Marawi, located on the southern island of Mindanao. As reporter Michael Sullivan told NPR's Newscast unit, "Duterte was in Marawi for the announcement, which seemed a bit premature given that gunfire and explosions could be heard as soldiers attempted to clear what the government claims is the last pocket of resistance in the city, less than a mile away from where Duterte delivered his speech."

The president spoke alongside photos of two militant leaders, Isnilon Hapilon and Omarkhayam Maute, who the government says were killed in battle on Monday.

The fighting has raged since May, NPR's Colin Dwyer reported:

"Marawi, a predominantly Muslim city in a majority-Christian country, has been roiled by bloodshed since jihadi fighters seized parts of the urban center. ... An alliance of ISIS-aligned militant groups, including the Abu Sayyaf and Maute groups, seized the opportunity presented by a botched attempt to capture extremist leader Isnilon Hapilon on May 23, occupying positions throughout the city."

The military says the fighting has killed more than a thousand people, most of them militants, Sullivan reported. He added: "Hundreds of thousands of civilians have fled the city, much of which is now in ruins."

Military spokesman Restituto Padilla told The Associated Press that up to 30 militants remain entrenched in a pocket of the city, holding some 20 hostages, and that the fighters still hold some 5 acres in Marawi.

Military chief Gen. Eduardo Ano told the AP that the militants are "leaderless and they have no more organization," adding that "there are still skirmishes."

As the fighting nears its end, there are big questions about the city that civilians will return to. "The heart of the city of 200,000 has been levelled by air strikes," Reuters reports. It adds that Duterte said of the destruction that "we had to do it ... there was no alternative."

The AP spoke with Seima Munting, a mother of four who fled the fighting in Marawi. "My brother told me that finally we can return home, but when? When can we finally return home?" she asked. "What will we return to? Do we still have a house? Do we have jobs?"

Copyright 2017 NPR. To see more, visit