Terrified families waved white flags as they emerged from homes reduced to rubble in the Iraqi city of Ramadi, where government troops were still battling Islamic State fighters holed up on Friday, five days after the army recaptured the city centre.
The provincial capital in the fertile Euphrates River valley west of Baghdad is the biggest city to have been recaptured from Islamic State, and the first retaken by Iraq's army since it collapsed in the path of the militants' advance 18 months ago.
The victory has been hailed as a turning point by the Iraqi government, which says its rebuilt army will soon march on Islamic State's main Iraqi stronghold Mosul further north, and defeat the group in Iraq in 2016.
As an Iraqi army column advanced through the ruined city, an elderly woman emerged from a home waving a white flag on the end of a stick. Soon, she was followed by children, a wounded woman being pushed in a wheelbarrow and men carrying small children in their arms. They flinched as explosions could be heard in the distance.
"They (Islamic State) are not Muslims, they are beasts," one of the men rescued from the central district told a Reuters television cameraman accompanying the advancing Iraqi column.
"We thank our security forces, from the soldiers to the generals. They saved us," the man said before breaking into tears.
Another man told Reuters television that the fighters had killed seven people who refused to come with them to another district where they were making a stand.
Major Salam Hussein told Reuters television that the militants were using families as human shields. More than 52 families had been rescued so far in the city, he said.
Another military officer, reached by telephone from the battlefield, said security forces were using loudspeakers to urge civilians to head toward the advancing troops, before calling air strikes from a U.S.-led coalition on residential blocks still held by the militants.
The presence of civilians was delaying the advance of the troops eastward from the central district they captured on Sunday, where the provincial government is located, the officer said.
"Warplanes do not strike any target in central Ramadi unless they are sure there are no civilians nearby," said the officer.
The victory in Ramadi, which was captured by ISIS fighters in May, was by far the biggest success for Iraq's army since it fled in the face of the fighters' lightning advance across a third of Iraq in 2014, abandoning its American armour.
ISIS has declared a "caliphate" to rule over all Muslims from territory it controls in both Iraq and Syria.
The fighters have imposed an ultra-hardline version of Sunni Islam disavowed by all major Sunni authorities, and carried out mass killings and rapes. Most regional and world powers have joined the battle against them, often backing rival groups in complex, multi-sided civil wars in both Iraq and Syria that make it difficult to achieve international unity.
The United States is leading a coalition with European countries and major Arab states that has been striking ISIS targets from the air, but a central challenge has been rebuilding the Iraqi army into a force capable of capturing and holding territory on the ground.
Previous battles were fought with the army playing a supporting role behind Iranian-backed Shia militia fighters, although this risked alienating Sunni Muslim residents in ISIS-held areas.
A key part of the strategy for the government is to put Ramadi in the hands of local Sunni tribal figures, an echo of the 2006-2007 "surge" campaign by U.S. forces at the height of the 2003-2011 U.S. war in Iraq, in which Washington secured the help of Sunni tribes against a precursor of ISIS.
Provincial police chief Brigadier Hadi Rizaiyj said police were investigating males who remained behind in Ramadi to determine whether they had links with ISIS.
"The counter-terrorism forces are freeing civilians in distress and delivering them to the Anbar province police; the police then have names of wanted people," Rizaiyj said.
"If we can prove that a civilian had a brother fighting with Daesh and he helped him with information or something similar, then we keep him with us" before turning them over to the judiciary on terrorism charges, he said.
Some 4 million people have fled ISIS-held territory in Iraq, most of them Sunni Muslims.
Iraq's most senior Shia cleric, Ali al-Sistani, whose strong backing for the campaign against ISIS has helped rally Shias behind Prime Minister Haider al-Abadi's government, called for local tribes to be enlisted to prevent ISIS fighters from returning to recaptured areas.
"Bringing home the displaced people should be done according to a mechanism," said a sermon read out by Sistani's representative Sheikh Abdul Mahdi al-Karbalai in the holy Shia city of Kerbala.
"Security forces, together with the residents of these areas and the tribes, should coordinate to ensure that the terrorist gangs cannot return again and form sleeper cells that constitute a danger."