And by all accounts, life in Baghuz as it was besieged these last few weeks was bleak.

“Ask me, when is the last time I had an egg? One year ago,” said Amy, a 34-year-old Canadian woman who fled the village recently and gave only her first name. She had left her job as a graphic designer in Alberta with her two toddlers to join her husband in Syria.

“I just want to go home and have the biggest Tim Hortons coffee,” she said, referring to the Canadian coffee shop chain.

But those who have tracked the group since it took root in Iraq in the early 2000s say that even after losing its land, the group is far stronger today than it was the last time it was considered defeated — in 2011, the year American troops pulled out of Iraq.

The militants were down to their last 700 fighters then. Now, American and Iraqi officials estimate that the group still has thousands of fighters and tens of thousands of adherents dispersed across Iraq and Syria.

Signs of the group’s resurgence are already visible.

In the first 10 months after Iraq’s prime minister at the time, Haider al-Abadi, declared victory over the militants in his country, the group carried out 1,271 attacks there, according to Michael Knights of the Washington Institute for Near East Policy.