The top leaders of Islamic State-aligned militants who besieged the southern Philippine city of Marawi have been killed during a battle to rescue hostages.
Philippine army commanders are now confident they will be able to quickly retake the city after the killing of Isnilon Hapilon, Islamic State's designated leader in south-east Asia who is on America's list of most wanted terrorists with a US$5 million bounty on his head.
Duterte lashes UN in profanity-laden rant
Philippines President Rodrigo Duterte strikes out at the European Union after lawmakers warned the Philippines it could lose U.N. membership over its war on drugs.
Also killed was Omar Maute, a Middle East-educated extremist who described himself on Facebook as a "walking time-bomb". Â
Maute had pledged allegiance to Islamic State.
Six of his brothers and a half-brother were among hundreds of militants who rampaged through Marawi, the Islamic capital of mainly Catholic Philippines, on May 23, waving Islamic State flags, using hundreds of hostages as human shields and torching buildings, including the town cathedral.
Since then at least 822 militants,162 government soldiers and 47 civilians have been killed.
Large parts of the lakeside city have been destroyed during street battles and relentless US-backed air strikes on militant held positions.
The siege that took the Philippine military by surprise stoked fears that Islamic State will establish a foothold in the southern Philippines from where its fighters could launch attacks across the region.
The militants have proved to be highly trained and equipped and had meticulously planned the siege, including building a network of tunnels and secretly smuggling in large quantities of weapons and supplies.
Bobby-trapped buildings hampered assaults on militant-held buildings.
Before Monday's assault the Philippine military said around 100 civilians remained in the conflict zone, including hostages and the families of militants.
"Women and children are now forced to fight together with the Maute-IS fighters," said Colonel Romeo Brawner, deputy commander of the task force battling the militants.
"This is the last defensive stand."
Philippine President Rodrigo Duterte, who imposed martial law across the southern Philippines in response to the siege, warned against celebrating the city's liberation, saying "we do not want to show any kind of celebration or happiness".
Reports of the deaths of Hapilon and Maute circulated in June and April but they were found to be false.
Hapilon, an Arabic speaking Islamic preacher, gained notoriety as leader of the ruthless Abu Sayyaf group that has carried out beheadings, kidnappings, bombings, assassinations and armed attacks since the 1990s.
The Philippine military targeted him in numerous operations and came close to killing him on several occasions but he always evaded capture.
The so-called "Maute group" headed by Omar Maute took the lead in the Marawi siege, according to the Philippine military.
The siege has prompted Mr Duterte, a fierce nationalist, to accept offers of international support to help counter threats from Islamic extremists.
Indonesia, Malaysia and the Philippines have begun coordinated air patrols.
Mr Duterte accepted Australia's offer to step-up the sharing of intelligence and Australian spy planes have been flying over Marawi to help intelligence gathering.
More than 100 Philippine marines and Australian naval personnel on the Australian navy ship HMAS Adelaide took part in exercise drills at the weekend.
Australia is the only country aside from the US which has a defence pact with the Philippines that allows its forces to train in the country.