Philippine military airstrikes aimed at Islamist militants who are battling soldiers in a southern city instead killed 10 troops and injured seven others, the defence secretary said on Thursday.
"A group of our military armed men were hit by our own airstrikes. Ten killed," Defence Secretary Delfin Lorenzana told reporters in Manila, adding the incident happened on Wednesday.
Security forces have been battling militants flying the black flags of the Islamic State (IS) group in Marawi, a major Muslim city in the predominantly Catholic Philippines, since Tuesday last week.
The military has bombed and fired rockets from attack helicopters throughout the conflict at the militants, who have been hiding in residential areas holding hostages.
About 2,000 civilians are also trapped in the militant-held areas, according to the local government.
Military chiefs had repeatedly said the assaults involved "precision" and "surgical" airstrikes, and assured they were not harming any of the trapped civilians or hostages.
"It's sad but sometimes it happens in the fog of war. The coordination was not properly done," Lorenzana said Thursday as he announced the deaths.
He told AFP later via text message that seven soldiers had also been wounded.
The clashes erupted when security forces raided a house to arrest Isnilon Hapilon, a veteran Filipino militant regarded as IS's leader in the Philippines. He is on the US government's list of most-wanted terrorists.
Authorities said they were taken by surprise when dozens of gunmen emerged to protect Hapilon and then went on a rampage through Marawi, which has a population of 200,000.
Most of the residents had fled the city but the International Committee of the Red Cross has repeatedly expressed deep concern for those who remained trapped, and called for a humanitarian ceasefire
"I think it's horrific for the civilian people who are in there and we really hope that both sides can agree that the civilians should be given the opportunity to come out," the deputy head of the ICRC's Philippine delegation, Martin Thalmann, told AFP in Marawi on Wednesday.
President Rodrigo Duterte declared martial law across the entire southern region of Mindanao in response to the crisis, which he described as the start of a major campaign by IS to establish a foothold in the Philippines.
Eighty-nine militants have been killed in the fighting, and the gunmen have murdered 19 civilians, the military said on Wednesday.
The announcement of the friendly fire deaths brings the number of security forces killed to 31, and the combined death toll to 139.