A few hundred men who had scurried across front lines in a refugee exodus from Mosul sat on the ground in neat rows before an Iraqi intelligence officer who scanned the crowd for hidden militants.
The officer pulled a teenager onto a raised platform and asked the group if he belonged to Islamic State (IS).
Muffled groans were followed by nods and muttered comments.
The youth was then dragged off to a pickup truck and his arms tied behind his back.
He confessed to a three-month membership in IS and spending a week in a training camp, but said he had only been a cook and never carried a weapon.
As growing numbers of residents flee fighting between insurgents and Iraqi military forces seeking to recapture the IS-held western half of Iraq's second largest city, security units have been transporting civilians to government-run camps and weeding out IS infiltrators.
Just over a week into the offensive on the militants' last urban bastion in Iraq, some 14,000 inhabitants have slipped out of the city, trekking through stony desert.
Most are women, children and elderly but there are also hundreds of young men who must pass screening by the security forces.
All are hungry and thirsty after three months under a virtual siege of western districts by Iraqi forces.
Some have been wounded in the crossfire of a battle that could deal a hammer blow to Islamic State's territorial ambitions.
Up to 400,000 people may have to leave their homes during the new U.S.-backed offensive launched this month after Iraqi forces finished clearing districts east of the Tigris River that cleaves the city in Iraq's far north.
The intelligence officer, who spoke to Reuters on condition of anonymity, said he had extracted seven suspected Islamic State members on Sunday, the first day of mass displacement from western Mosul.
Reuters saw four more in detention on Monday.
"The fighters don't come out," he said.
Those who were loyal to the jihadist movement but played a less public, mainly non-combatant role are more likely to try to slip through the dragnet, the intelligence officer added.
Security forces keep on hand some local Mosul inhabitants they refer to as "sources" to help them identify suspects.
One of the "sources", a wiry young man wearing a green balaclava to shield his identity, stood with intelligence officers as a new batch of men handed over their identification to be checked against a computer database.
Most Islamic State militants are killed in battle, though Iraqi forces have captured alive a handful over the past week including a few from former Soviet republics and China.
The intelligence officer said he had learned to pinpoint IS associates from how they behaved with him.
"You can tell because they are afraid.
Those who are not Daesh are also afraid but it's different from the fear of those who are with Daesh," he said, without elaborating, using an Arabic acronym for Islamic State.
The Iraqi military considers the screening process to be effective so far, but gives no figures.
“We have a mechanism.
We have names and sources but even so we don't know all of them.
But there are people who cooperate; most of them are cooperative," the intelligence officer said.
Some of those held in groups for interrogation were clearly motivated to expose IS supporters in their midst by the repression and brutality of Islamic State's rule in Mosul.
"People are cooperative because two years is a long time to be under constant pressure," the intelligence officer said.
"When you ask who among you is with Daesh, there are people who will point them out and say they did such and such.
Like these guys, this morning I brought them one and asked if they knew him.
Two of them got up and said he is Daesh."
A U.S. intelligence official who asked not to be named said some Islamic State combatants had escaped Mosul as well as the Syrian city of Raqqa amidst the chaos of combat, but U.S.-backed forces' encirclement of both cities had reduced the risk of militants making their way out to carry out attacks elsewhere.
People arrive at the initial screening site behind front lines just south of Mosul caked in dust, some carried on stretchers or the backs of others.
The first thing they ask for is usually a cigarette. Smoking was forbidden under the Islamic State regime, but many people still risked lashes for a few puffs.
Supplies of most commodities have run out and prices have skyrocketed in west Mosul since Iraqi forces cut off the last road westward to IS-controlled territory in Syria three months ago.
Many families have subsisted on little more than bread.
An elderly man waiting for security screening said people had died in their homes from hunger.
"There was nothing to buy.
You have money but what can you do, eat money?" he said.
"It's not that prices are high, (but that) there is no food.
"Some people had to leave their dead relatives in their house."
The journey out of western Mosul is treacherous and disorienting.
Families are often separated and unsure when they will see each other again or where they will ultimately end up.
Civilians say Islamic State has targeted them with mortars and snipers along the route, which takes at least an hour of walking and another half hour piled into military trucks.
A 16-year-old shepherd lost part of his flock last week when a mortar crashed into it.
He slaughtered the wounded animals and sold the meat to Iraqi policemen securing the area.
This week, families were squatting in a ditch in the open desert waiting for trucks to carry them the rest of the way.
A few women seized the opportunity to swap their black niqab veils for colourful headscarves, which show their faces and so were banned by Islamic State.
Dawud Dargham was boarding a bus to a government-run camp after fleeing from a village near Mosul airport. He said he was anxious about the future.
"There is a limit to what we can endure.
We are humans made of flesh and blood."
The teenage cook exposed as an IS supporter, clad in a blue tracksuit and barely old enough to grow a beard, was sitting later in the bed of a truck as three other men with pillow cases over their heads were tossed in.
When the intelligence officer began to ask him more questions, the youth's eyes welled up.
"Don't cry," the officer advised with a hint of tenderness before the vehicle took off, kicking up a cloud of dust.