“Who is responsible for us?” asks Sarah Ibrahim, 31, one of more than 2,000 foreign women and children detained at camps in northern Syria with no foreseeable way out.

ROJ CAMP, Syria — When her husband uprooted their family from Morocco to live under the Islamic State in Syria, Sarah Ibrahim had little choice but to go along. After he disappeared — she believes he was killed in an airstrike on a prison — she fled with her two sons.

They were captured last year and have been held ever since in this dusty, sweltering detention camp in northeastern Syria. They are among the more than 2,000 foreign women and children being held in such camps, trapped in a legal and political limbo with no foreseeable way out.

Their home countries do not want them back, fearing they could spread radical Islamist ideology. The Kurdish authorities that administer this stateless war zone do not want them either, and say it is not their job to indefinitely detain citizens of other countries.

“You told us to leave ISIS and we left, but we are still considered ISIS,” said Ms. Ibrahim, 31, her frustration dissolving into tears. “So who is responsible for us? Who will determine our fate?”

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.

On a rare visit to the largest of these camps, known as Roj, Kurdish officials allowed us to interview Arab women held there but refused to let us interview or photograph Western women for fear it would complicate negotiations with their governments about their return home.

An Egyptian woman and her daughters inside their tent at Roj Camp. The camp’s 1,400 foreigners come from about 40 countries, including Turkey, Tunisia, Russia and the United States.

But during a walk through the camp, we spoke informally with women from France, Germany, Denmark, Holland and a number of Arab counties….