That problem is rearing its head in the Middle East right now - but it's likely to impact many countries, sooner or later. Strategy Page reports:
In northeast Syria the U.S. backed SDF (Kurdish led Syrian Defense Forces rebels) have a growing problem with ISIL (Islamic State in Iraq and the Levant) wives (and their children) that ISIL had ordered to surrender as SDF captured the last ISIL controlled territory in eastern Syria (Deir Ezzor province). The mass surrenders began at the end of 2018 and by April the SDF had 63,000 of these refugees. Since then that has grown to 74,000 and the SDF is pressuring the U.S. and the UN to provide more than the $9 million a month just to supply the main al Hawl refugee camp with food and other supplies ... The problem is essentially how to deal with a lot of hostile prisoners that are largely foreigners but whose loyalties are often uncertain, or definitely pro-ISIL. No wonder the nations these “refugees” came from refuse to take responsibility for them.
. . .
Most foreign, especially Western, nations are refusing to take their citizens back. That’s because the legal systems in the West demand a higher degree of proof which is not available to the degree Western trails demand. Yet Western authorities realize the ISIL family returnees, especially the mothers, are often still true believers and are teaching their children to think the same way. Most of these returnees would be turned loose by the courts for lack of sufficient evidence of past terrorist crimes or current attitudes. The Western nations do not want to raise another generation of Islamic terrorists within their borders. Meanwhile, the SDF is stuck with over 50,000 of these possibly pro-terrorist women and children.
. . .
Some Moslem countries (Kazakhstan, Morocco, Macedonia, Sudan, Indonesia, Russia, Iraq, and Kosovo) agreed to take back their citizens and a few Western nations took back a few, But none of the Western nations are interested in taking back all of their citizens and in many cases the Western states simply canceled the citizenship of those who went off to live in the caliphate and now want to “go home.” Worse, these Western nations are unwilling to contribute the cash to improve conditions in al Hawl and assist the SDF in sorting out the innocent from the ISIL. SDF is telling anyone who will listen (a small and dwindling group) that if help is not forthcoming the result will be bad for everyone. Future historians and pundits will go on about, “if other nations had acted” when they could and should have. The SDF can see the future in this respect because they are living through it.
There's more at the link.
Having seen refugee camps, some more or less prisons, others less so, in various parts of the world, I can sympathize with the SDF in its dilemma. They took prisoners because they had their Western allies looking over their shoulders, telling them not to kill surrendering ISIL terrorists and their families out of hand because that would look bad in the world's news media, and bounce back on the governments supporting the SDF. On the other hand, now that they've taken them prisoner, those same governments want to pretend the problem doesn't exist. "We don't have any citizens in SDF custody!" Sure, they don't - because they stripped their ISIL-sympathizing citizens of their citizenship, rendering them officially stateless. That leaves the SDF holding the baby (sometimes literally).
Of course, the Middle East has long had a "traditional" solution to this problem. It typically involved not taking prisoners at all, or doing so only long enough to separate those with important information (or wealth that could be extorted or tortured out of them) from those who had nothing of value to offer. The latter were then killed out of hand, while the former usually wished before long that they'd been granted that mercy. Nowadays, in the full glare of publicity, that's not an option . . . not, at least, until some major distraction gets the world looking elsewhere. As soon as something like that comes up, I'm willing to bet that the ISIL prisoner issue will simply "go away".
You think that's far-fetched? No, it isn't. In the West, we call it "ethnic cleansing" or something similar these days. It's been pretty common in Europe for a long time (centuries, if not millennia). It was used indirectly in North America to deal with "the Indian problem" (see the destruction of the buffalo and the deliberate spreading of disease, to name but two examples - not to mention the enlistment of one Native American tribe against another, which happened frequently). In Africa, defeated enemies of a tribe were usually either enslaved or slaughtered. No-one needs to be reminded of the monumental atrocities perpetrated by Mao, Stalin, Hitler or Pol Pot. The Middle East has had its share of the same thing, as any student of history will confirm. There's no reason why it can't happen again, because despite our veneer of "civilization", humanity hasn't changed much.
I think the West should "man up" and accept responsibility for its citizens who went to the Middle East to join or support ISIL. That means passing laws that can be used to incarcerate or otherwise control them, and then using those laws, regardless of what bleeding-heart social justice ****ers say about them. If we don't, we're effectively giving implied consent to genocide - because that's what will happen, if no other solution is forthcoming.