Two women in a white pick-up were sobbing as they inched forward in a crush of vehicles leaving the besieged southern Philippines city of Marawi. In the back lay the lifeless body of their father, caught in the crossfire between government soldiers and Islamist militants.

A young man waved a white sheet to signal they were in an emergency, hoping soldiers would hurry them through gridlocked traffic. It was futile. Vehicles were forced to slowly wind their way through a series of barriers as soldiers painstakingly checked for militants.

"Our father was killed yesterday,” said one of the women, who did not give her name. “He was hit by an airstrike. "

The family was part of a steady exodus out of Marawi that began when fighting erupted a week ago. It quickly escalated into intense urban warfare, including helicopter rocket attacks on buildings where Islamist fighters were thought to be holed up.

The conflict began with a failed attempt by security forces to capture Isnilon Hapilon, a member of the militant group Abu Sayyaf who the government says is affiliated with the so-called Islamic State. The operation was foiled when dozens of members of the Maute, another Islamist group that has pledged allegiance to IS, drove back security forces.

The gunmen then abducted a Catholic priest and civilians who had taken shelter in a church, and their fate is still unknown. Maute also took over government buildings including a school and a hospital, and freed prisoners from two jails.

IRIN accompanied soldiers past hundreds of residents who were fleeing in the opposite direction, many on foot, pushing carts full of possessions. A convoy of armoured vehicles pushed into the heart of the city, which now resembles an apocalyptic ghost town. Soldiers took positions against walls pockmarked by bullets; smoke rose in the distance.

Many of Marawi’s 200,000 residents have left by now and humanitarian agencies like the Red Cross are supporting them, while people in neighbouring towns are posting signs offering them “Free Food”.

Dennis Jay Santos/IRIN

Residents of towns near Marawi offered food to residents fleeing the city

Officials said at least 61 militants have been killed, along with 18 security forces and 19 civilians. The bodies of eight people were discovered in a ravine on Sunday after being shot with their hands tied behind their backs, and a sign attached to one of them read “munafik”, or “traitor”.

"All civilians executed were perpetrated by this group," a local military spokesman, Captain Michael Malacat, told IRIN, referring to the Maute group.

He said the military was still trying to verify if people were trapped in some parts of the city, after they called a government hotline.

General Restituto Padilla Jr., spokesman for the Armed Forces of the Philippines, told reporters in the capital, Manila, on Monday that security forces were close to taking back the city from Maute.

“Our forces are in complete control of the city, except for certain areas of the city where they continue to hold,” he said.

Martial law

The Philippines' tough-talking president, Rodrigo Duterte, has declared martial law not only in Marawi, but throughout Mindanao. The southernmost region of the country, Mindanao includes a large island as well as smaller ones, and it is home to most Muslims in the Philippines, an overwhelmingly Catholic country.

Mindanao is also home to armed groups that have fought decades-long communist and Muslim insurgencies. Several Islamist groups have broken away from the main Muslim rebel armies, most significantly Abu Sayyaf, which formed in 1991 and had early links to al-Qaeda. The fragmentation has increased in recent years as a peace process faltered, and some of these smaller groups have declared their allegiance to IS.

Duterte’s declaration was quickly followed by questions about why he needed to impose martial law in stable areas of Mindanao. Some warned that it could ignite conflicts with other armed groups that have settled into an uneasy peace with the government, such as the Moro Islamic Liberation Front, and that it could derail peace talks with communist insurgents.

“The imposition of martial law throughout Mindanao for at least 60 days could also affect the Philippine armed forces’ handling of other armed conflicts on the island, including with the communist New People’s Army (NPA) and various Moro insurgent groups,” said Human Rights Watch in a statement on 25 May.

The statement was prescient.

Two days later, the NPA accused the government of using martial law as an excuse to step up attacks against them and said it had “little option but to undertake more and more tactical offensives.”

The government responded by announcing that it was withdrawing from the next round of peace talks.

Rights groups also worried that martial law could further strengthen Duterte’s heavy-handed approach to his war on drugs, which has killed about 7,000 people in the past year. The main casualties have been members of poor communities rather than drug kingpins.

Speaking to troops on Sunday on the island of Sulu, an Abu Sayyaf stronghold, Duterte said Islamist militants were financing themselves through the drug trade.

“The root cause of the present crisis is illegal drugs... Marawi is the hotbed of meth manufacturing and trade in Mindanao,” Duterte said, according to a statement released by the president’s office.

HRW and others also heard dark echoes of Ferdinand Marcos, who ruled as a brutal dictator from 1972 to 1981 after declaring martial law – especially since Duterte promised that his version would “not be any different from what the president, Marcos, did. I'd be harsh.”

Duterte has threatened to extend martial law across the entire country.

Dennis Jay Santos/IRIN

Soldiers searched vehicles of residents fleeing Marawi

Abuses from both sides

Not all residents of Marawi oppose martial law.

Sittie Ayeesha Dicali, a former journalist from Marawi who abandoned her career after repeated death threats, noted that Maute had carried out similar attacks before.

The government blamed Maute for the September 2016 bombing of a night market – which killed 15 people – in Davao, Duterte’s home city and where he served as mayor for two decades. In November last year, the group occupied the centre of Butig, flying the IS flag from the town hall before being driven out by a week-long military offensive that included airstrikes.

“In the past incidents, they were able to escape and continue to grow,” said Dicali. “We want the government to be able to crush the group, because we cannot afford to have another siege.”

The Department of National Defense issued a statement saying that “the rule of law and human rights should prevail” in areas under martial law.

But such reassurances are tempered by past experience.

Jalal Bilao, a Marawi resident and former vice-mayor of nearby Tubaran, ventured out into the deserted streets in his neighbourhood. He echoed a longstanding complaint – that civilians are caught between government forces and militant groups, and suffer at the hands of both.

“We want the president to protect the people,” he said. “We are mad at these ISIS (fighters), but at the same time scared of the military, because of what is happening.”