After a week of intense fighting, the Filipino military is close to liberating a city in the southern Philippines the Islamic State had overrun.

“Our forces are in complete control of the city, except for certain areas where they continue to hold. These are the subject of clearing operations that are continuously being conducted,” Brig. Gen. Restituto Padilla Jr. told reporters Monday, according to media reports from the Philippines. The militants are still present in nine of the city’s 96 communities.

Padilla explained that the military hopes to “end this as soon as possible … Our ground commanders have assured that the end is almost there.”

The fighting began last Tuesday after a botched raid by government security forces attempting to capture Abu Sayyaf leader Isnilon Hapilon, a high-profile terrorist target believed to have been tasked with leading ISIS operations in Southeast Asia. The fighters traveling with Hapilon requested reinforcements from the Maute Group, turning a small firefight into a full-scale battle.

Both Maute and Abu Sayyaf have sworn allegiance to ISIS and carry black flags similar to those carried by ISIS. Both groups are part of a broader insurgency in the southern Philippines.

The ISIS-linked rebels quickly took control of large areas of the city, raising their standards above government buildings. They set schools and churches on fire. They freed inmates from local prisons and took Christians as hostages.

The militants beheaded the police chief and gunned down civilians unable to recite prayers from the Quran.

Over 60 militants, along with 20 Filipino soldiers and an estimated 19 civilians, have died in the fighting in Marawi. Most of the militants fighting in the city are teenagers whose minds have been twisted by an ideology of hate. Residents have fled the city by the tens of thousands over the past few days.

The government has declared martial law in the southern Philippines, and security forces have locked down Marawi to prevent the fighting from spilling over into neighboring areas.

Some observers suspect that the radical militants may have taken over the city just before Ramadan in an effort to prove themselves to ISIS and demonstrate that their groups represent legitimate Southeast Asian affiliates.

The military is conducting ground raids, artillery strikes, and precision airstrikes. Thousands of residents remained trapped and are fearful that they will be killed in the fighting.

“We do have the expertise, we do have the people to man equipment, and we have the equipment to do surgical airstrikes. Please do not underestimate your soldiers. We have been into this fight longer than any country in this part of the world and anywhere else. And we have proven ourselves many times over,” a military spokesman said.

The spokesman said that they will do their best to avoid civilian casualties.

Follow Ryan on Twitter

Send tips to ryan@ dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.