US special forces have joined the battle in southern Philippines town Marawi in efforts to end the siege against Islamist militants holed up there.
The Philippines military said the United States was providing technical assistance to end the siege of Marawi City by fighters allied to Islamic State, which is now in its third week, but it had no boots on the ground.
The Philippines military suffered its biggest one-day loss since 10 troops were killed in a friendly-fire incident on June 1.
The seizure of Marawi on 23 May by hundreds of fighters who swore allegiance to Islamic State, including dozens from neighbouring countries and the Middle East, has fuelled concern that the ultra-radical group is gaining a foothold in South-East Asia.
At least 200 militants are holed up in a corner of the town with an estimated 500 to 1000 civilians trapped there.
Lieutenant Colonel Jo-Ar Herrera announced there had been 13 Philippine marines killed in the battle, a setback in the government's quest to retake the city.
He said the marines were conducting clearing operations died after an "intense" house-to-house firefight. They encountered improvised explosive devices and were attacked by rocket-propelled grenades, he said.
The US embassy confirmed it had offered support, at the request of the Philippines government, but gave no details.
"They are not fighting. They are just providing technical support," Lieutenant Colonel Herrera said.
A US P3 Orion surveillance plane was seen flying over the town on Friday, media said.
The cooperation between the longtime allies is significant because President Rodrigo Duterte, who came to power a year ago, has taken a hostile stance toward Washington and has vowed to eject U.S. military trainers and advisers from his country.
The deaths took to 58 the number of security forces killed, with 20 civilians and more than a hundred rebel fighters also killed in the Marawi fighting.
Some civilians have been held as human shields, while others were hiding in their homes with no access to running water, electricity or food.
The military said it was making headway in the town but was proceeding carefully so as not to destroy mosques where some of the militants had taken up positions.
"We give premium to the mosques, because this is very symbolic to our Muslim brothers," Herrera said.
The Philippines is majority Christian, but Mindanao has a significant population of Muslims and Marawi City is overwhelmingly Muslim.
One of the main Islamist factions dug in around the heart of the city is the Maute group, a relative newcomer amid the throng of insurgents, separatists and bandits on Mindanao.
Herrera said the military was "validating" reports that the two Maute brothers who founded the group had been killed.
"We are still awaiting confirmation," he said. "We are still validating those reports but there are strong indications."
Maute joined forces with Isnilon Hapilon, who was last year proclaimed by Islamic State as its Southeast Asia "emir". Military officials believe Hapilon is still in the town.
The military has said it is aiming to end the siege by Monday, the Philippines' independence day.