Philippine troops engaged Islamic State-linked militants in pitched clashes on Thursday around the southern city of Marawi as the military deployed tanks to secure vital installations in a battle that has become a major test for President Rodrigo Duterte’s government. With thousands fleeing the city and militants holding a Roman Catholic priest and others hostage, television footage showed black smoke billowing near Marawi’s City Hall as civilians who had held out in the besieged city watched from rooftops. Explosions and bursts of gunfire could be heard at a distance, as the military asserted it was making progress clearing out “desperate” militants, forcing them to split into groups as they darted around the city trying to flee. The fighting led Mr. Duterte to impose martial law over the…