They were living in holes in the ground with only dry flatbread to eat at the end. They had no clean water to drink and no medical care for those wounded in an intense military campaign.
But if it were not for the call from their leaders to leave, they would have stayed.
Such is the devotion of several hundred men, women and children who were moved on Friday from the last piece of land controlled by ISIS, a riverside pocket that sits on the edge of Syria and Iraq.
Hundreds, if not thousands, more remain holed up in Baghouz – the last part of the militants’ self-proclaimed caliphate that leaders once said would stretch to Rome.
They include militants, their family members and other civilians who are among the group’s most determined supporters. Many of them travelled to Syria from all over the world and stuck around as the militants’ control crumbled.
“Baghouz maybe is the most difficult moments of all my life,” said Umm Youssef, 21, a Tunisian-French woman who came to Syria at 17 with her mother.
Food was scarce and water was dirty, but she said she had no regrets.
Umm Youssef sent her two children and her mother out of the town last month and stayed with her husband.
At least 36 flatbed lorries used to carry sheep moved the dishevelled, haggard crowd out of the territory to a desert area kilometres away for screening.
They were the latest batch of evacuees from the territory after air strikes and clashes meant to bring about the complete territorial defeat of the militants.
For now, the civilians are expected to be sent to a displaced people’s camp, while suspected fighters will go to detention facilities.
Earlier evacuations have already overwhelmed camps in northern Syria and at least 60 people who left the shrinking territory have died of malnutrition or exhaustion.
In a dusty area surrounded by grass, women in abayas and hijab and children in dirty jackets formed a line. Many of the children were crying for food.
Men wearing tattered headscarves formed another. Foreign men filled a third.
One woman had given birth in a lorry. An old man was carried in a blanket by two others to the screening line. A young girl sat under the shade of the wheel of a lorry looking dazed, while another moved between the crowds, asking for food.
They included French, Polish, Chinese, Bengali, Egyptians, Tajiks, Moroccans, Iraqis and Syrians.
It is impossible to know if all are wholeheartedly behind the militant group or how many expressed support out of fear of reprisals.
But many vehemently defended ISIS, saying the group was down but not out and that they only left because of an order from the remaining religious leader.
Some referred to the wali, the provincial leader, while others said the order was from the group’s top leader, Abu Bakr Al Baghdadi, who is referred to as the “Caliph”.
It is not clear if ISIS leaders were in agreement. Amid the military pressure, reports have emerged of disagreements among them.
The Syrian Observatory for Human Rights said one ISIS leader was beheaded in recent days for urging civilians to leave.
All those interviewed gave nicknames or no names at all for fear of their safety.
Their view of their glorious caliphate was hard to see from the hills overlooking Baghouz. A four-year international campaign reduced ISIS’s territory from nearly a third of Syria and Iraq to a tent camp and a few homes in the village overlooking the Euphrates River.
An estimated 300 ISIS militants are besieged there, hemmed in by the river and the US-backed Syrian Democratic Forces, a Kurdish-led militia leading the fight against ISIS after an intense push that began in September.
Thousands of civilians have also poured into the area. The presence of so many of them, and possibly senior members of the militant group, in Baghouz has surprised the SDF and slowed down the expected announcement of the extremist group’s territorial defeat.
Recapturing Baghouz would mark an end to the militants’ territorial rule but few believe that will end the threat posed by an organisation that still stages and inspires attacks through sleeper cells in Syria and Iraq, and has active affiliates in Egypt, West Africa and elsewhere.
The group also has a presence online, using social media to recruit new members and promote its attacks.
In the past few weeks, nearly 20,000 people have left Baghouz on foot through a humanitarian corridor, but the militants then closed the passage and no civilians left for a week until Wednesday, when a large group was moved out.
Among those evacuated on Friday was a group of 11 Yazidi children. Thousands from the Yazidi minority were kidnapped by ISIS in Iraq in 2014 and are still missing.
In the dusty clearing where the evacuees were being screened, a 16-year-old mother of two from Aleppo said she had not had food for a couple of days, choosing to feed her children instead.
A child said he had not showered in a month and a woman from Tajikistan asked for a phone to call her mother. Frantic and in tears, a mother held out her pale and motionless toddler, screaming for help.
The cries of hungry children rang through the open desert as SDF officials searched the evacuees’ belongings.
But of more than a dozen people spoken to, only four said they didn’t want to be in Baghouz.
They described living in dug-up holes with hoisted tents to protect against air strikes. Some said they initially had lentil soup but then only green-brown loaves of flatbread were available.
“We weren’t going to leave but the Caliph said women should leave,” said Umm Abdulaziz, 33, a Syrian mother of five. “I wanted to stay.”
Her husband stayed behind to fight.
A few were critical. “Order or no order, I wanted to get out,” said Aya Ibrahim, an Iraqi mother who said she was unable to secure medicine for her children.
“Many families died from air strikes. Many kids died from hunger.”
The 16-year-old Syrian mother said she lost four husbands, her father, sister and two brothers.
Umm Mohammed said days were hard, with food prices soaring and intensive bombing campaigns keeping them in hiding.
About two kilograms of sugar went for nearly 30,000 liras (Dh257), more than 30 times the price in other parts of Syria, while a litre of cooking oil cost 10,000 liras.
“I have not eaten in four days,” she said.
Then the order came for them to leave. But for some, it’s not the end.
Umm Youssef said she had no plans or desire to return to Tunisia, saying she would find her way to another Syrian city.
“ISIS is over? Says who?” asked a Syrian girl, 14. “Wherever you go there is ISIS.”