Over the next two years, terrorism convicts will walk free from European prisons by the dozens — more than 200 inmates who largely formed the first wave of jihadis streaming to Syria and Iraq, dreaming of an Islamic caliphate not yet established.
In all, about 12,000 Europeans left to fight with the Islamic State group and al-Qaida beginning in 2011; about a third of those are now believed to be back home, mostly living freely. Some are awaiting trial, but most never even faced serious charges due to insufficient evidence.
And many more were thwarted from traveling to the war zone entirely, left to stew and, sometimes, plot at home.
U.S. & World
The day's top national and international news.
How much of a threat do these avowed extremists living throughout Europe pose, and how equipped are authorities to deal with them? The tactics thus far have been, at best, improvised.
The impending releases of jihadi veterans could be considered "a fourth wave of returnees," according to Rik Coolsaet, a scholar at Belgium's Egmont Institute who has done extensive research on violent extremism.
"There are a number of personal frustrations and motivations that have pushed the kids in their journey to ISIS that we now have to address," Coolsaet said. "If we don't address it now, the environment will remain as conducive for this kind of jihadi violence."
Farid Benyettou, a former influential crusader who has now publicly renounced extremism, fears Europe is not braced to cope with the hordes of believers roaming free.
Once nicknamed the "imam Voltaire" after the high school he left to become a backroom preacher to young Muslims in his Paris neighborhood, Benyettou has written a book detailing his descent into becoming a propagandist of Islamic extremism. He views the coming round of prison releases with an apprehension born of firsthand experience.
Benyettou, now 38, spent four years in prison on terrorism charges, alternating between recruiting fellow inmates to the cause and furiously studying for his degree. It took years for him to disavow the ideology he once spread so effectively. Now, he says extremism sows only death.
Among the group of young men he once led are Cherif and Said Kouachi, who gunned down 12 people at the offices of the satirical newspaper Charlie Hebdo in 2015. Another follower blew himself up in Iraq; yet another died in Syria fighting for the Islamic State group.
The cell he once led epitomizes the urgent question Europe now faces: Are the terrorism convicts on the verge of freedom like Benyettou, the Kouachis or somewhere in between?
"These guys who are convicted today or who are awaiting trial will get out one day," Benyettou said in an interview with The Associated Press. "And that's the issue, in fact: What kind of preparations will there be for their release?"
Terrorism prison sentences in Europe until very recently averaged about six years, compared to 13 years in the United States, according to data from Europol.
Since the Charlie Hebdo attacks, the sentences have crept up across the continent, but still remain well below U.S. levels.
"The danger is the risk of recidivism. We should not be too quick to believe certain terrorists who say they are repentant," Catherine Champrenault, the Paris prosecutor general, said in a recent interview with the newspaper Le Monde.
France, which has been struck repeatedly by Islamic State fighters and sympathizers, will be freeing 57 inmates — about half its current population of terrorism convicts. In Britain, where nearly half of terrorism sentences are four years or less, 25 inmates are due for release — fully three-quarters of those convicted under one of the country's main terrorism statute as of mid-2017.
In Belgium, 80 acknowledged foreign fighters already are free and as many as 44 others will be joining them. In Spain, 21 of 34 returning extremists already were free as of late last year. And in Bosnia and Kosovo, every single jailed foreign fighter will go free.
In just those countries alone, the total runs to more than 200, according to the AP's count. By comparison, a Congressional Research Service report last year said 50 "homegrown violent jihadists" were to be released by the end of 2026.
And Europe's actual number is undoubtedly higher because not every country releases its data — most notably Germany, which had nearly 1,000 residents make jihadi trips but has not released any comprehensive figures on convictions or releases.
The most recent attack blamed on returning foreign fighters was in March 2016, when an Islamic State cell of jihadis set off suicide bombs at the Brussels airport and in the metro.
Made up of veterans from Islamic State in Syria — as well as friends and family recruited to the cause — the network already had attacked a Paris-to-Brussels high-speed train in August 2015 and bars, restaurants, a concert hall and a sports stadium in an orchestrated assault on Paris in November 2015. In all, the cell killed 162 people.
Still, the overwhelming majority of returning jihadis have not been arrested and have caused no harm.
Many of the homegrown jihadis are young men from poor backgrounds who have limited education and feel cut off from the society that surrounds them. A startling number lack the presence of a father.
In trial after trial, few of them say they have abandoned the cause of jihadism. Rather, they say, the cause abandoned them. Most described traveling hundreds of miles only to find themselves in the midst of internecine fights for territorial control, rather than battling Syrian President Bashar Assad's forces or helping civilians.
Once they leave prison, no programs or policies govern them.
France has applied a range of post-release constraints, ranging from requiring those freed to periodically check in with authorities — as is the case for Benyettou — to perpetual home detention for former prisoners like Kamel Daoudi, who was convicted in a plot to bomb the American embassy in 2005 and has been under house arrest since his 2008 release.
House arrest has come increasingly rare since the end of France's state of emergency near the end of last year, with just 36 people consigned in the past five months, compared with 754 immediately after the November 2015 attacks.
In Bosnia, where all 23 terrorism convicts already are done with their sentences or soon will be, the Justice Ministry said local housing, social workers and employment agencies are notified of the releases, but that there's little capacity to do much else.
Britain puts forward only limited counseling and monitoring, and offers a voluntary program to help former inmates re-integrate.
"If they don't want to do that, they don't have to do that. Because of course prison terms assume that you're sentenced for a fixed time and that once you serve that time you're a free person again," said Richard Barrett, a senior adviser with the Soufan Group and expert on violent extremism.
Spain theoretically began "re-education and reinsertion" in 2016 in which terrorism inmates are evaluated by their perceived risk level and undergo the appropriate counseling. But according to the government, only 10 out of the 146 inmates jailed for ties to extremist Islamic groups actually have undergone the much-hyped deradicalization program. The Interior Ministry refused to explain why.
Expelling the extremists is not a realistic remedy: The vast majority of the continent's foreign fighters and sympathizers are purely European, which means they cannot legally be stripped of citizenship or deported.
Still, Denmark has moved to strip the citizenship of a man born and raised in the country and ship him to Turkey when he completes his six-year prison term. Hamza Cakan, a pizzeria owner who joined the Islamic State and holds dual citizenship, returned home and was arrested when he tried to leave again for Syria in 2015.
Expulsion is at least on the table for those born elsewhere. One example is the case of Djamel Beghal, a Franco-Algerian who was Daoudi's co-defendant and another mentor of the Kouachi brothers.
France has stripped Beghal of his French citizenship and plans to send him directly to Algeria, his birth country, when he is released in August, despite repeated criticism from the European Court of Human Rights.
Those who are legally judged to be dangerous are likely to remain behind bars for years to come: Salah Abdeslam and Mohamed Abrini, both linked to the Islamic State network that attacked Paris and Brussels, have not even come to trial on those charges.
And Tewffik Bouallag, an unrepentant former Islamic State fighter from France who was detained after hopping a flight from Istanbul to Berlin, was sentenced to 14 years in prison late last month.
As for Benyettou, he decided to become a nurse after leaving prison in 2009. Three years later, as he was completing his degree, extremist Mohammed Merah killed seven people, attacking French soldiers and a Jewish school.
Something in Benyettou clicked, but there was still a certain distance between him and Merah, with whom he had no personal connection. That changed with the slaughter at Charlie Hebdo.
"The people who committed those crimes, those were people who were directly linked to me," he said. "I had a certain responsibility. ... It was within these groups that people were defending death, and I had defended death."
Benyettou's dreams of becoming a nurse evaporated that day — no one would hire him after learning of his ties to the Kouachi brothers. So he now is training to be a truck driver.
He is philosophical about yet another dramatic shift in direction.
"Everyone has setbacks in life, plans that don't happen. For me, it's my past," he said. "You bounce back and try to do something besides to fall back on this logic of victimhood, to say 'They'll never want us anyway. They'll never let us dig ourselves out.'"
Having a plan — any plan — was crucial to Benyettou leaving extremism behind.
And that's where many fear not just France but all of Europe will fail the next wave of terrorism convicts.
"Sending them back to exactly the same circumstances that caused them to take up violent extremism, well, unfortunately, you're probably going to get the same result," said Barrett of the Soufan Group, a strategic consultancy firm that advises governments and corporations.
The judge made the same point at the recent trial of Erwan Guillard, a Frenchman who converted to Islam, quit the military and appeared with his battle wounds in an Islamic State propaganda video.
Guillard left Syria voluntarily, surrendered to police and provided French intelligence with information about ISIS and its foreign fighters, according to trial testimony. He said he left ISIS because he was disappointed with what he found in Syria, but he showed no sign of giving up on the ideology that inspired his journey.
"One of these days, you're going to leave prison. What will you do?" the judge asked him.
Guillard seemed momentarily puzzled, murmuring something about learning to drive a big rig. He then looked straight at the judge.
"I don't see any future in France," he responded. "We don't share the same values."
Aritz Parra and Sabina Niksic contributed.