Troops backed by attack helicopters battled dozens of militants linked to the Islamic State group holed up in a besieged city in the southern Philippines on Thursday after attempts to secure volatile areas met heavy resistance.

Army tanks packed with soldiers rolled into the mainly Muslim Marawi City as gunfire and explosions rang out after militants linked to the Islamic State group torched buildings, seized more than a dozen Catholic hostages and raised the black flag of Isil.

The army sent about 100 soldiers, including US-trained special forces, to retake buildings and streets in the area held by militants of the Maute group, which has pledged allegiance to Islamic State of Iraq and the Levant (Isil).

Thousands fled as rebels seized large parts of the city in running battles with government forces that erupted on Tuesday afternoon after a failed raid by security forces on one of the group's hideouts.