The Philippines deployed attack helicopters and special forces to drive out Islamic State-linked rebels holed up in a besieged southern city on Thursday, as efforts to take back control met heavy resistance.

Ground troops hid behind walls and armoured vehicles and exchanged volleys of gunfire with Maute group fighters, firing into elevated positions occupied by militants who have held Marawi City on Mindanao island for two days.

Helicopters circled the city, peppering Maute positions with machine gun fire to try to force them from a bridge vital to retaking Marawi, a mainly Muslim city of 200,000 where fighters had torched and seized a school, a jail, a cathedral, and took more than a dozen hostages.



"We're confronting maybe 30 to 40 remaining from the local terrorist group," said Jo-Ar Herrera, spokesman for the military's First Infantry Regiment.

"The military is conducting precise, surgical operations to flush them out ... The situation is very fluid and movements are dynamic because we wanted to out-step and out-manoeuvre them."

The battles with the Maute group, which has pledged allegiance to Islamic State, started on Tuesday afternoon during a failed raid by security forces on one of the group's hideouts, which spiralled into chaos.

The turmoil was the final straw for President Rodrigo Duterte, who delivered on his threat to impose martial law on Mindanao, the country's second-largest island, to stop the spread of radical Islam.

Islamic State claimed responsibility late on Wednesday for Maute's activities via its Amaq news agency.

At least 21 people - seven soldiers, 13 rebels and a civilian - have been killed and religious leaders say militants were using Christians taken hostage during the fighting as human shields.

The White House condemned the Maute group as "cowardly terrorists" and said in a statement the United States was a proud ally of the Philippines and would continue to support its fight against extremism.

GETTING OUT

Hundreds of civilians, including children, were sheltering in a military camp in Marawi City as troops helped clear the few remaining people from streets where smoke lingered in the air.

"We're leaving," said a resident named Edith, walking along a rundown street carrying a small suitcase.

"We can no longer take it and we need to save our children."

Sultan Haji Ismael Demasala said he was staying and would leave his fate in God's hands.

"If Allah wills it so, then we cannot stop it," he said, pointing his finger in the air.

Hostilities eased overnight but flared late on Thursday morning when troops started their clearing operations.

A major obstacle was an armoured vehicle parked across a bridge, which Maute fighters were using for cover, a Reuters journalist said.

Marawi is in Lanao del Sur province, a stronghold of the Maute, a fierce, but little-known group that has been a tricky opponent for the military.

Tuesday's raid was aimed at capturing Isnilon Hapilon, a leader of radical faction of another militant group, the Abu Sayyaf. The government says Hapilon is a point man for Islamic State and has been collaborating with the Maute group.

"Based on our intelligence, Isnilon Hapilon is still in the city," Herrera said.

The Maute group's rise is a source of concern for Mindanao native Duterte, who is familiar with Muslim separatist unrest but alarmed by the prospect of rebels helping Islamic State to recruit and establish a presence in the volatile region of 22 million people.

Duterte has threatened harsh measures and said martial law would remain be maintained for as long as it took to restore order.

The president was due to hold a cabinet meeting on Thursday in Davao, his home city and the biggest on Mindanao.

Security was stepped up in Davao, with more military checkpoints and some businesses sending staff home during daylight hours. Residents were urged to stay vigilant.

In the city where Duterte was mayor for 22 years, and enjoys a cult-like following, residents were supportive of martial law.

"It's not a hassle. It is good because it prevents harmful events," said manicurist Zoraida Jakosalem Himaya.

"He is like a father telling his children what to do."