The operation to defeat an attempt to establish an Islamic State Caliphate in the Philippines suffered a major setback Tuesday as the nation’s air force conducted an airstrike that killed eleven of its own soldiers.

A Philippine military Marchetti S-211 jet bombed a tactical position in the southern city of Marawi, overrun with Islamic terrorists belonging to Abu Sayyaf and the Maute group – indigenous jihadist movements that have pledged allegiance to Islamic State caliph Abu Bakr al-Baghdadi – on Wednesday. In one case, the airstrike successfully targeted a Maute group position. In the other, it landed on Manila’s own soldiers, killing eleven and injuring seven others.

“There were two planes flying. The first plane dropped the ordnance accurately, the second went wrong and hit our troops,” Defense Secretary Delfin Lorenzana explained at a press conference Thursday. “It’s painful, it’s very sad to be hitting our own troops. Sometimes, in the fog of war, a lot of things could happen.”

Lorenzana added that the failed airstrike was the first accident of its kind in the history of the Philippine air force and that the military would investigate what went wrong to prevent future incidents. It remains unclear whether the jet’s bombs landed on the wrong position or the ground troops had entered the location without updating those in the air, but Lorenzana said signs pointed to “pilot error.”

The Armed Forces of the Philippines (AFP) are considered ceasing airstrikes over Marawi because of the incident, but Lorenzana told reporters they had yet to make a decision, and the government would ultimately leave the decision at the hands of military commanders. Marawi is a densely populated city of 200,000 on the island of Mindanao, home to much of the nation’s Muslim majority. Its narrow streets and populated buildings have made the mission to eradicate ISIS elements especially difficult for Philippine soldiers without endangering the civilian population.

Manila’s official death count has surpassed 160 people, including 21 “state personnel” and 89 terrorists. The AFP says that eight terrorists affiliated with Maute have voluntarily surrendered and urged others to do the same or face certain death. “These individuals have been talked to and debriefed and have provided very, very valuable intelligence,” spokesman Brig. Gen. Restituto Padilla said. He added that only about ten percent of the city’s territory is controlled by ISIS terrorists.

President Rodrigo Duterte announced a 60-day period of martial law over all of Mindanao last week in response to the ISIS attack, urging residents to evacuate. Eyewitnesses who fled the scene have told reporters that ISIS terrorists, many of them as young as thirteen, are forcing civilians to recite Islamic prayers or be killed. The discovery of a pile of bodies labeled “munafiq,” or “hypocrite,” suggest that the terrorists, in an attempt to purify the population, are killing Muslims who do not properly answer their religious questions. Eyewitnesses have said that Muslims are fleeing along with Christians and have taught Islamic prayers to Christians to protect them in the event of their capture.

While Maute and Abu Sayyaf are indigenous jihadist groups, Duterte announced Thursday that evidence suggests that the Marawi siege is a “purely ISIS” attack led by foreign fighters. “The rebellion in Mindanao, it’s not Maute,” he insisted. “The Marawi siege has long been planned. It could not be just a decision to ‘let’s go to Mindanao.’” Among the foreigners, according to Lorenzana, were Saudi, Yemeni, and Russian fighters.

The attack began last week as the Philippine police attempted to raid the hideout of Isnilon Hapilon, the head of Abu Sayyaf. Duterte’s government insists the attack was planned long before then, however. Duterte’s government has used the foreign nature of the invasion to attract support from indigenous Islamic groups. As Duterte spent more than two decades as mayor of Mindanao’s Davao City, he boasts friendly ties with separatist groups like the Moro Islamic Liberation Front (MILF) and the Moro National Liberation Front (MNLF), who view him as more sympathetic to their concerns than the political elites from the nation’s north. Reports began to surface Wednesday that MILF and MNLF fighters had joined Philippine soldiers in fighting ISIS in Marawi.