Housands of civilians fled fighting in the Philippines on Wednesday as troops tried to fend off Islamist militants who took over large parts of Marawi city, taking hostages, seizing and torching buildings and setting free scores of prisoners. Islamic State claimed responsibility for the rampage via its Amaq news agency. The attacks came as President Rodrigo Duterte declared martial law on Mindanao, the Muslim-majority island where Marawi city is located. The violence flared in Marawi on Tuesday afternoon after a botched raid by security forces on a hideout of the Maute, a militant group that has pledged allegiance to Islamic State. Fighters quickly dispersed, torching buildings and taking over bridges, a hospital, two jails, a church and a college. Duterte said he heard reports they may have beheaded a police chief.