A Philippine air force fighter jet missed its target in an airstrike Wednesday against Islamic State group-aligned militants in southern Marawi city, killing two soldiers who were hit by debris from a building where they were taking cover, military officials said.

Eleven other soldiers were slightly wounded and taken to a hospital after being hit by shrapnel when the aircraft dropped its bomb about 250 meters (820 feet) from its target, military spokesman Col. Edgard Arevalo said.

It was the second deadly accident involving aerial bombing since the military launched an offensive to end an unprecedented siege of the lakeside city by hundreds of militants. A bomb dropped by a military jet on May 31 hit an army position and killed 11 soldiers in Marawi.

"We are saddened by this unfortunate incident," Arevalo said, adding an investigation was underway.

Since the intense urban fighting broke out on May 23, at least 389 militants including foreign fighters, 90 soldiers and policemen, and 39 civilians have been killed. The battles have forced nearly 400,000 residents to flee from Marawi and outlying towns in Lanao del Sur province.

About 300 other civilians remain trapped in their houses near the fighting or are in militant custody, slowing the advance of troops in the last four areas of Marawi where less than 100 gunmen are still fighting from small buildings and houses, military officials said.

President Rodrigo Duterte declared martial law for 60 days in the country's south to deal with the Marawi insurrection, the worst crisis he has faced since taking office in June last year. Duterte has said he will likely extend the martial rule, which is to expire on Saturday, because the situation remains critical.