MOSUL, IRAQ - The families come in waves, trudging through the ruins of Old Mosul as Iraqi and coalition forces capture buildings one by one.
They are starving and cry out for water. Children are covered in rashes. It is more than 45 degrees Celsius (113 degrees F), and dead IS fighters rot in the searing rubble. Many people have no shoes.
One woman sinks to the ground. Her 6-month-old daughter, Elaf, lost consciousness in the airstrike that sent them running. Now Elaf is dead.
"She's gone!" her mother wails, rocking back and forth as she weeps and feels the baby for a pulse, still hoping. The grandfather, gaunt and in his 70s, urges her to stop crying and keep moving out of the war zone.
Soldiers tell families they must continue on, as the thinnest and the oldest collapse. Among these sick and dying have been more than 40 suicide bombers, both men and women, in the past few days.
Most of the bombers' only victims were themselves, but some succeeded in killing and maiming soldiers and civilians.
However, as families leave the war zone, the vast majority desperately try to hold on to life, not end it. Soldiers forget their caution, scrambling to give them water, biscuits or anything else they have. Elaf's mother holds her daughter's lifeless body and squeezes into a humvee, hoping against hope that someone can help.
Nearby, an Iraqi translator hands one woman his bottle of water. She gulps it down and soon after throws it up.
These are IS's last victims in Mosul as the militants' rule here collapses. Many of the people fleeing the city now are widely believed to be the families of IS militants, both living and dead.
Some admit to being related to an IS member. Most do not.
Iraqi soldiers say they have no mandate or desire to punish starving women and children. Like other families in Mosul, IS relatives are suffering for what the militants have done.
Families leaving the war zone are screened several times as Iraqi forces search for bombers and fleeing militants.
The first level of screening is on the front line, where government snipers watch in both directions, searching for signs of bombers among the families. Women are told to remove the veils from their faces. Men must lift their shirts.
In the relative safety behind Iraq's front line, men and women are separated. Men's identifications are run through databases, and their bodies are searched for bombs and other weapons. Female volunteers search women.
Women, children and the elderly then move on to places like a field hospital, where they can eat, rest and seek emergency care. The sickest leave in ambulances.
One woman at a field hospital does not want to move to the next screening point, one of two more before she can register for a tent or transportation elsewhere. Her husband, she says, is still being checked and she wants to wait for him.
"His brothers are with IS," she tells a soldier. "But he is innocent."
"We will check him, and God willing, it will all be fine," the soldier replies. "Now go and get in the truck. You can meet him at the next screening point."
As she departs, the soldier drops his voice. "We know who her husband is. He works for IS, producing their videos," he says.
Since the beginning of the government offensive last year, IS fighters have hidden among families fleeing Mosul.
It's often ordinary people who turn in the extremists when they reach Iraqi forces.
"We arrested a man the other day after the people said he was with IS," explains Iraqi Federal Police Colonel Taha al-Hussaini at a screening center on the edge of the battle. "He said he was from a different neighborhood, and the people were mistaken. They just didn't know him."
But then a little boy in the group began to cry. "That is my uncle. Where are you taking him?" the boy asked, according to al-Hussaini. The people knew exactly who he was.
The United Nations has warned that relatives of alleged IS members are under threat of "collective punishment" from local authorities or other civilians.
Families of IS members fleeing often either keep it secret or just keep to themselves.
"A woman came to me saying, 'I know they all hate us,' " says al-Hussaini, " 'but it's not my fault my husband joined IS.' "