I N THE FIRST heady days of their self-proclaimed caliphate, foreigners who joined Islamic State ( IS ) gleefully renounced their ties to the West. Jihadists from France, Canada and other countries filmed themselves burning their passports. But as IS nears its defeat, once-belligerent radicals act now like aggrieved tourists stranded on a package holiday. A Canadian man complains that his embassy has not been in touch. A British woman who had “a good time” in Raqqa wants help to return to London.

These IS members are a serious problem for their home countries. More than 41,000 foreigners travelled to Syria and Iraq to join the group. By the middle of last year 7,366 had returned home, according to the International Centre for the Study of Radicalisation, a think-tank in London. Thousands more died on the battlefield. What remains are around 850 men and a few thousand women held in makeshift camps scattered across eastern Syria.

Until recently their home countries were happy to leave them there. Then came President Donald Trump’s decision in December to withdraw American troops from Syria. The Kurdish-led forces who control the area are already ill-equipped to hold thousands of prisoners. It will become nigh-on impossible after America pulls out. Mr Trump wants foreign governments to repatriate their citizens. “The alternative is not a good one in that we will be forced to release them,” he tweeted. A bad alternative indeed—but so are the others.

The simplest is to make the detainees someone else’s problem. A law passed in 2015 lets Australia strip citizenship from people who join terrorist groups. It was first used in 2017 against Khaled Sharrouf, a Lebanese-Australian man who photographed his young son holding a Syrian soldier’s severed head. International law frowns on making people stateless; Australia’s law applies only to dual-nationals.

Britain has no such hang-ups. It has cancelled the nationality of Shamima Begum, who joined IS as a teenager, on the ground that her Bangladeshi mother makes her eligible for citizenship there. Mr Trump says an American-born woman who was a propagandist for IS will not be allowed home. Courts may overturn these decisions. Even if they do not, it is unseemly for Western governments to dump their citizens on other states. Western countries are surely better equipped to handle them than, say, Lebanon or Bangladesh.

Saudi Arabia takes a different tack. In 2004, after a wave of domestic terrorist attacks, it created a rehabilitation centre for extremists. Detainees are held in a pleasant compound with a swimming pool and art therapy. Conjugal visits are allowed. Such efforts are expensive, though. They require prolonged, one-on-one attention from teachers and clerics, and are likely to be unpopular in the West. France set up its own deradicalisation centre three years ago in a chateau in the Loire Valley. Residents studied history and philosophy and met an imam to discuss religion. They were meant to stay for ten months, but the centre was closed after locals protested against the radicals in their midst.

It is also impossible to know whether these schemes work. Scholars disagree on how people become radicalised or even how to define the term. Saudi Arabia claims that less than 20% of its 3,000-plus graduates returned to jihad—which means its curriculum failed hundreds of times. A Somali-American man arrested at the airport in Minnesota, on his way to Syria, was released from custody in 2017 after a seemingly successful year in rehab. What worked for him may not work for hardened fighters who massacred and enslaved innocent people. Sentencing them to a glorified summer camp feels unjust.

Yet putting them on trial is complicated. America has a decent record. One man was sentenced to 20 years in prison and a second was indicted in June. But it was unable to try a third suspect for lack of evidence. He was released after more than a year in custody. Heiko Maas, the German foreign minister, says his country faces a similar problem. Testimony from battlefield interrogations is inadmissible in court. Documents recovered by Kurdish fighters have no chain of custody.

Australia has a useful tool: the “declared-area offence”, which makes it a crime to enter proscribed areas. Only Mosul and Raqqa were labelled as such, however. To use the law, prosecutors must prove that suspects entered those cities. Even that can be difficult. Once they are convicted, states must decide where to hold them. America provided no more than 300 fighters and even fewer came back. Jailing them is easy. Not so in Europe, where the numbers are often greater. Some European countries already have problems with radicalisation in their prisons. Adding returned fighters to the mix could incubate the next round of extremists.

Faced with such problems, politicians understandably throw up their hands. If their citizens committed crimes abroad, should they not be tried there? But eastern Syria’s Kurdish-led administration is not a state. Its rudimentary courts lack due process and may not exist much longer. With their American protectors gone, the Kurds will face attacks by both Bashar al-Assad’s regime and the Turkish army. They will probably cut a deal with Mr Assad. If their detainees wind up in Syrian jails, history suggests what may happen next. Mr Assad’s dungeons have produced generations of radicals, who are occasionally set free when politically expedient.

That leaves one last option. “The Pentagon was very clear with us that there’s a good chance they get sent to Guantánamo,” says a congressional staffer. America has not added prisoners to the camp since 2008. President Barack Obama spent eight years trying to close it, and its population has shrunk from 242 detainees in 2009 to just 40 today. Democrats will probably oppose any attempt to reverse the trend.

Dealing with those who return will require a mix of trials, monitoring and rehabilitation. Police will need resources, and prosecutors ways to introduce sensitive evidence in open court. Deradicalisation programmes have merit, especially in prisons and for those brought to Syria and Iraq against their will or as children.

No Western politician wants to be responsible for bringing potentially dangerous radicals back home. But leaving them in Syria or dumping them on developing countries does not make the problem go away. It also sends a message that Western governments do not care about the millions of Syrian and Iraqi lives their citizens helped to destroy.