Updated

Philippine President Rodrigo Duterte said Tuesday that a disastrous siege by Islamic State group-aligned militants of a southern city may end in 10 to 15 days but warned that the threat posed by the brutal group will continue to plague the country.

Duterte said he would try again this week to travel to Marawi city to be with government troops but acknowledged that bad weather and the danger posed by the militants' deadly firepower have frustrated his travel plans.

"I think in 10 to 15 days it'll already be OK," Duterte said of the protracted urban battle with the militants, whose supply of weapons has surprised him.

"But remember the new scourge is ISIS, it will continue to haunt us," he said, using an acronym for the Islamic State group, in a speech before business executives.

Duterte said last Friday he would likely extend 60 days of martial law he imposed in the southern Philippines to deal with the Marawi crisis because the situation remains critical.

Hundreds of gunmen who attacked mosque-studded Marawi, a center of Islamic faith in the south of the predominantly Roman Catholic nation, on May 23 are believed to belong to at least four local armed groups that pledged allegiance to the Islamic State group and joined in a loose alliance. Several foreign fighters also joined the insurrection. An unspecified number of gunmen are believed to have slipped out of the lakeside city.

After 50 days of ground assaults and airstrikes, troops have recaptured most areas of the city, with the death toll recently surpassing 500.

Military spokesman Brig. Gen. Restituto Padilla said 381 militants, 90 soldiers and policemen and 39 civilians have been killed in the fierce street-to-street fighting. About 300 civilians remain trapped in their homes in areas of fighting or are held by the militants, he said.

Security officials received intelligence about the planned attack days before the unprecedented Marawi siege unfolded, but they, along with the president, have acknowledged they underestimated the militants' firepower.

"We knew that they were ... all of them were there," Duterte said. "But what I really didn't know ... the large number of firearms ... the supply doesn't end."

The militants' vast arsenal reflects a failure to address the spread of firearms in the volatile region, where insurgents and armed groups controlled by politicians have long had a presence. "The problem would not have erupted in this magnitude if the proliferation of loose firearms was addressed years earlier," Padilla said.

Duterte has attempted twice to travel to Marawi to join government forces but said Tuesday that heavy rain and the danger posed by the militants have scuttled his plans. In his latest attempt last Friday, the tough-talking president donned a military camouflage uniform and carried an assault rifle.

"I was circling Marawi, I could not land. I could not go down nearer because we may get hit by a Barrett caliber 50 by chance," Duterte said, referring to a powerful machine gun that the militants have used.

"It's not braggadocio," said Duterte, who has backed troops by visiting their camps, the wounded and attended the wakes of slain soldiers. "It's just that I don't want to go there when it's already peaceful."