The so-called caliphate of the Islamic State, which once stretched across large swaths of Syria and Iraq, drew tens of thousands of partisans from around the world who came to fight or to live in what was billed as a pure Islamic society. Among them were many women, some who were brought by their husbands or fathers. Others came alone and married, or were forced to marry, after they arrived.

But as the caliphate collapsed under a military campaign by Kurdish militias backed by a United States-led military coalition, many of the men were killed or captured. The wives and children who survived ended up in camps like this, unwanted by anyone.

“We are working responsibly, but the international community is trying to flee from its responsibilities,” said Abdul-Karim Omar, an official in the local administration charged with persuading governments to take their citizens back, an effort he acknowledges has not been very successful.

“This is a ball of fire that everyone is trying to get rid of and threw to us,” he said.

The absence of any plan to deal with the detainees is part of the wider disorder in the lands liberated from the jihadists. In Iraq, many of the women who once lived among them face swift trials and death sentences on charges of supporting the Islamic State.

In Syria, they are effectively prisoners in dingy camps in an area under the control of no internationally recognized authority that might be able to press their home countries to take them back.