The last two surviving leaders of a deadly siege in the southern Philippines were killed Monday in a push by thousands of troops to retake the last pocket of Marawi city still held by pro-Islamic State militants, security officials said.

Four military and police officials said that Isnilon Hapilon, who is listed among the FBI's most-wanted terror suspects, and Omarkhayam Maute were killed in a gun battle and their bodies were found in Marawi.

Marawi is a mosque-studded centre of Islamic faith in the south of the predominantly Roman Catholic nation.

Defence Secretary Delfin Lorenzana later said: "Yes, they are confirmed dead."

Mr Lorenzana said DNA tests would be done on the remains of the two militant leaders to pave the way for the payment of huge US and Philippine bounties offered for the two.

A top Malaysian militant, Mahmud bin Ahmad, who uses the nom de guerre Abu Handzalah and is a close associate of Hapilon, has not been found and was among the remaining militants being hunted by troops, he said.

Hapilon has been blamed by the US for ransom kidnappings of several Americans, one of whom was beheaded in 2001 in southern Basilan province.

Hapilon had been indicted in the District of Columbia for his alleged involvement in terrorist acts against US nationals and other foreigners.

Military leaders had said last month that three leaders of the militants who began the siege of the lakeside city on May 23 were killed in the months of fighting but the two still alive were leading a final stand.

More than 1,000 people have been killed in the Marawi violence, including more than 800 militants.

Army Colonel Romeo Brawner said Sunday about 40 militants were still fighting in a small hilly residential area by Lanao Lake, including 100 relatives of the gunmen and civilian hostages.

On Saturday, troops attempted to rescue several hostages but only snatched a 16-year-old female captive because of intense militant fire, which wounded an army battalion commander and more than 20 other soldiers, Col Brawner said.

The rescued hostage provided the crucial information that allowed troops to locate Hapilon and Maute in one building, Mr Lorenzana said.

Among the last batch of surviving fighters were about 10 foreigners, mostly Malaysians and Indonesians, but there were no immediate word about their condition, the military said.

President Rodrigo Duterte declared martial law in the south, the scene of decades-old Muslim separatist uprising, to deal with the siege, the worst crisis he has faced since rising to power in June last year.

Mr Duterte has gone to the battle area a number of times to rally the troops, once firing a sniper rifle toward militant position.

He has vowed to have the militants killed to the last man because of the deaths and destruction wrought by the violence in Marawi.