Marawi (Philippines) (AFP) – US troops are on the ground helping local soldiers battle Islamist militants in a Philippine city, a Filipino military spokesman said Wednesday, giving the most detailed account of their role.

The small number of US soldiers are providing vital surveillance assistance and, although they do not have a combat role, are allowed to open fire on the militants if attacked first, spokesman Brigadier-General Restituto Padilla said.

“In a battle the most important item for the commander is to be able to determine what is happening,” Padilla said as he confirmed that men in civilian clothes caught by a television camera flying drones from a pickup truck were US troops.

“It’s called situational awareness and that is the sort of assistance being given.”

The Philippine military has for over three weeks been engaged in fierce battles with hundreds of militants, who have pledged allegiance to the Islamic State group, in the southern city of Marawi on Mindanao island.

The fighting has left 202 gunmen dead, while 58 soldiers and 26 civilians have also been killed, according to the government.

The militants have withstood a relentless bombing campaign that has made parts of Marawi, the most important Islamic city in the mainly Catholic Philippines, resemble war-devastated cities in Iraq and Syria.

The Philippines and the United States are longtime allies and are bound by a mutual defence treaty. 

American troops have since 2002 rotated on short-term deployments in the southern Philippines to provide intelligence and counter-terrorism training to Filipino troops. 

There used to be about 600 American troops in the south at any one time but the operations were scaled down in 2014.

The issue of US troops in the Philippines has become extremely sensitive since Rodrigo Duterte became president last year and sought to downgrade his nation’s military alliance with the United States in favour of China.

Duterte has repeatedly called for American troops to leave the Philippines.

Last weekend Duterte said he was not aware that US soldiers were helping in Marawi, while making a frank admission that his military favoured close ties with the United States.

“Our soldiers are pro-American, that I cannot deny,” Duterte said.

Aside from the television footage of the American drone operators, cameramen in Marawi have regularly filmed a US spy plane over the city.

The US embassy announced at the weekend that special operations forces were providing assistance in Marawi, but gave no details.