Yet few have been able to leave.

The Iraqis face being ostracized for their ISIS associations or sent to detention camps if they return to Iraq, which has been executing people accused of being ISIS members in what watchdogs and journalists have called sham trials. The Syrians may not have homes to go back to.

And the roughly 10,000 foreigners from at least 50 other countries are largely unwanted at home.

The Kurdish authorities overseeing the camp have pleaded for the non-Syrians to be allowed to return to their own countries, saying they are not equipped to detain them indefinitely. But only a few countries, including Kazakhstan, Uzbekistan and Tajikistan, have repatriated their citizens on a large scale, with the occasional exception of a few young children whom Western governments have agreed to take back.

“They’re in no man’s land. They’re in limbo,” said Sara Kayyali, a Syria researcher at Human Rights Watch who visited the camp earlier this year. “They’re stuck in the desert in a camp that’s not equipped for their needs, with children who grew up in the worst possible conditions, only to get to a place where things are, if possible, even worse.”

Adding to their frustration, the women have little information about where their ISIS fighter husbands are. Authorities at first told them that they would be reunited with their relatives or at least be allowed to speak to them, but little has come of that promise, partly because contact is seen as a security risk.

“I’m struggling to reconcile the two things, wanting to look at them as displaced people and human,” said Dareen Khalifa, an International Crisis Group analyst who has visited the camp, but some of the women are “very ideological, and the atmosphere is very ripe for all sorts of indoctrination of little kids and of women who just don’t know what’s going to happen to them or their families.”