Marawi (Philippines) (AFP) - United States special forces are providing support to the Philippine military battling to dislodge Islamist militants in a southern city, the US embassy said Saturday, as 13 Filipino marines were killed in fresh fighting.

Philippine troops are struggling to defeat hundreds of fighters, who rampaged through Marawi on May 23 flying black flags of the Islamic State (IS) group, and have used civilians as human shields, bomb-proof tunnels and anti-tank weapons to fortify their positions.

Friday's ferocious, street-to-street gunbattles with the militants saw 13 troops killed, in a dramatic surge in the toll from the conflict, Philippine military spokesmen said.

A 15-year-old boy was also killed by a stray bullet as he took part in Friday prayers at a mosque in Marawi as the skirmishes raged outside, an AFP video journalist said.

It was among the heaviest fighting seen in mainly Muslim Marawi as the air force battered parts of the city with strikes to support ground troops. Some 40 marines were wounded in the gunbattles that lasted 14 hours, according to military spokesman Colonel Edgardo Arevalo.

As the conflict intensified, the US embassy in Manila said American forces were providing assistance to the Filipino troops, although it declined to give details for security reasons.

"At the request of the government of the Philippines, US special operations forces are assisting the (Philippine military) with ongoing operations in Marawi," the embassy said in a statement.

- 'Intense firefights' -

Marawi-based military spokesman Lieutenant Colonel Jo-ar Herrera confirmed the US help, adding that the special forces were not fighting, but "providing technical support".

He told AFP Friday's deaths amounted to the military's biggest single-day loss in the campaign.

Herrera also said there are "strong indications" that Omarkhayam and Madie Maute, two leaders of the Marawi attack, were killed in separate operations.

But he added the military is still "validating" the report and there is no way of independently confirming it.

Story continues

"There were intense firefights, house-to-house gunbattles," Herrera said at a news conference in Marawi earlier in describing Friday's gunbattles, adding that the total number of government troops killed in the conflict was 58.

Over 20 civilians have been confirmed killed due to the fighting, according to the government, but the true number is likely to be higher with authorities yet to fully assess the roughly 10 percent of Marawi still being held by the militants.

Tens of thousands have fled Marawi, which is the Catholic country's most important Muslim city, as the fighting ripped through residential neighbourhoods, with more than 200,000 displaced people now living in precarious conditions and vulnerable to deadly health risks, the International Committee of the Red Cross warned Friday.

About 2,000 people are also believed to still be trapped in militant-held areas as insurgents continue to entrench themselves two weeks ito the conflict, which saw them take a Catholic priest hostage, open up two jails and destroy many buildings.

Herrera said security forces were struggling to contain the fighters without causing civilian casualties.

"The local terrorist groups are using the mosque, they are entrenched there. They also used civilians as human shields... we are very precise in our operations to avoid collateral damage."

President Rodrigo Duterte has said the militant attack was part of a wider plot by IS to establish a base in the southern region of Mindanao, and declared martial law there to quell the threat.

The announcement of US help in the embattled southern region of Mindanao comes after Duterte has sought to reduce the Philippines' reliance on the United States and build much closer ties with China and Russia.

The US Embassy said Washington would "continue to work with the Philippines to address shared threats to the peace and security of our countries, including on counterterrorism issues" in its statement Saturday.

The US on Monday gave the Philippines hundreds of machine guns, pistols and grenade launchers, which a local commander said would be used in the fight against Islamist militants.

Philippine military leaders have said their troops unexpectedly interrupted plans by the fighters to take over Marawi in a spectacular event to show that IS had arrived in the Philippines and was intent on carving out territory.

They initially estimated there were about 100 gunmen but later said there were as many as 500, supplemented by foreign fighters from Chechnya, Saudi Arabia and Yemen.

The gunmen have also had a surprisingly large arsenal of military hardware, including rocket-propelled grenades and a so-far inexhaustible amount of ammunition.

strs-mba/ds