US special forces are helping the Philippine military retake the southern city of Marawi from IS-linked militants, the Philippine army says.
The forces are providing technical help and are not fighting, it said.
President Rodrigo Duterte had earlier threatened to throw out US troops amid strained relations since taking office.
Militants have been under siege since rampaging through the southern city on 23 May. The latest fighting has claimed the lives of 13 Philippine marines.
Hundreds of militants, who have been flying the black flag of so-called Islamic State and are led by the self-styled IS emir of the southern Philippines, Isnilon Hapilon, and the Maute brothers Omar and Abdullah, are still holed up in the city.
The latest casualties bring the number of Philippine troops killed in the fighting to 58.
At least 138 militants and 20 civilians have also been killed, the government says.
The BBC’s Jonathan Head says there are several reports that the Maute brothers, who lead the Maute group, are among the dead, with intercepted communications from jihadist groups suggesting this.
In a press briefing, Lt Col Jo-ar Herrera said the army was checking the reports. He cited “strong indications” but gave no further details.
The brothers’ parents, who are believed to have helped fund their armed group, have been captured.
Marawi is on the southern island of Mindanao, which has a significant Muslim population in the majority Catholic country and has seen a decades-long Muslim separatist insurgency.
Col Herrera confirmed for the first time that US special forces were helping the army.
“They are not fighting. They are just providing technical support,” he said.
Reuters news agency earlier quoted the US embassy in Manila as verifying the presence of US forces. It would not go into operational details but said the US forces were helping at the request of the Philippine government.
The US has had a small logistical military presence in the Philippines, although a programme to advise the Philippine army on fighting the Abu Sayyaf militant group was discontinued in 2015.
Mr Duterte, a strongman who has supported the extrajudicial killing of drug users and other criminals, has been highly critical of the US since taking power last June, straining a long-time alliance.
But he had what the White House described as a “very friendly” phone call with President Donald Trump in April, and has since said his differences with the US were with President Barack Obama’s administration.
Philippine army spokesman Brig Gen Restituto Padilla Jr has vowed that the national flag will be flying once again over all of Marawi by Monday – the Philippine national day.
The army has missed past deadlines to rid the city of militants amid two weeks of air and ground assaults.
Col Herrera said the militants were now restricted to three districts within the city.
“The world of terrorism inside the city is growing smaller by the day,” he said.
Officials say that foreign nationals are among the militants in Marawi, with the list of countries and territories including Saudi Arabia, Indonesia, Malaysia, Yemen, India and Chechnya.