Like a bad movie where you've already seen the ending, history now risks repeating itself in a dangerous corner of the Middle East.
Kurdish-run camps and detention centres confining tens of thousands of Islamic State (IS) fighters and their dependants are boiling over with frustrated rage.
This month, spurred on by Turkey's incursion into Syria and encouraged by their fugitive leadership, they have vowed to break out and wreak revenge on both their captors and the West, reconstituting themselves as they did in 2013.
While Turkey's actions have undoubtedly propelled this problem into a crisis - in excess of 100 IS prisoners (some reports put the figure as high as 800) have reportedly escaped already and are now at large - the problem goes much deeper.
The fault lies primarily with Europe's governments. Since the military defeat of IS by the US-led coalition at Baghuz in Syria in March, the world has had seven months in which to resolve the issue of all these beaten jihadists and their often-fanatical dependants.
Most are from Syria and Iraq but both those countries are in varying states of upheaval and the recent sentencing to death by an Iraqi court of French jihadists has discouraged further transfers there.
The hard core of die-hard IS fighters and their dependants are nearly all from outside the region - Europe, North Africa, Egypt, Saudi Arabia, the Caucasus and Central Asia.
Recent reports from the largest camp, al-Hawl in north-east Syria, depict an ever-increasing takeover inside its walls by IS, including deadly punishments meted out by jihadist women. Children are growing up without any proper education and in some cases are being brainwashed with extreme and violent ideology.
"The people there (in these camps) are very extreme," said Michael Stephens from the London think tank Royal United Services Institute (RUSI).
"If they escape or are allowed to keep raising children in these camps the problem in 10 years will be severe."
Washington and its Kurdish allies have been pressing Europe to take back the estimated 4,000 plus nationals who slipped unnoticed across its borders and into Syria when IS was at its height.
But Europe doesn't want them back. Its intelligence agencies warn that many of those who survived the final days of IS's last stand will remain highly dangerous radicals, brutalised by the atrocities they have witnessed, and in some cases, committed.
According to the German magazine Der Spiegel, German officials believe that a third of its nationals currently in the camps - a total of 27 men and women - are "capable of carrying out violent acts including terrorist attacks". This, it says, explains the German government's reluctance to bring them home.
The problem is two-fold. Firstly, there is a fear that if and when these jihadists were eventually brought to trial in their home countries there could well be insufficient evidence - given the fluid circumstances in which they were captured - to convict them.
Governments would then be accused of allowing back in dangerous men and women who would go free and then pose a potential risk to national security.
Secondly, even if they were convicted they would only add to the growing problem of violent radicalisation taking place in European jails, where a disproportionate percentage of the prison population - notably in France - are from Muslim communities.
So the net result is that Europe has failed to act and the problem has been left to fester. As well as dangerous jihadists, thousands of innocent women and children have been left in limbo in these camps where in some cases those who do not follow IS's draconian rules are getting either indoctrinated or punished.
It is impossible to under-estimate the importance of "unjust imprisonment" in jihadist psychology. It goes right back to the 1960s when the radical Egyptian Islamist Sayyid Qutb was imprisoned and executed and his writings later became a blueprint for jihadist thought.
The assassination of Egypt's President Anwar Sadat in 1981 was followed by the mass imprisonment of Islamists in that country, something which became a rallying cry for their followers and which fed into Osama Bin Laden's al-Qaeda organisation.
After the US-led invasion of Iraq in 2003 the genesis of today's IS started out in the confines of the US-run Abu Ghraib and Camp Bucca prison camps that were set up.
Men like Abu Bakr al-Baghdadi, the group's current leader, exchanged ideas, swapped phone numbers with other prisoners and laid plans for an insurgency for when they got out. After eight years of misrule by an Iraqi government that discriminated against the country's Sunni minority, the jihadists chose their moment and swept into Mosul and northern Iraq in 2014.
The rest is history: it took another five years to dismantle their self-proclaimed caliphate.
So could the same thing happen again now? Probably not, say experts like Michael Stephens.
"The truth is that IS will struggle to reconstitute much past a low-level insurgency, but they'll be an irritant for years to come," he said. "A jail break would be highly worrying but the conditions on the ground are not really conducive to them simply rushing back in and filling vacuums in the way they did in 2013."
Certainly it is hard to see IS being able to rebuild anything like the physical, geographic space it occupied and controlled for five years across a great swathe of Syria and Iraq. But Dr Emman El-Badawy, who has spent years researching Islamist extremism and who now works for the Tony Blair Institute for Global Change, warns that IS is unlikely to pass up the opportunities now presented to it.
"The recalibration of IS is likely to be just as deadly and destructive as what we saw in 2014-17," she said.
"The group will be planting itself deeper into weakly governed areas and establishing safe havens for recruitment and training, fuelling instability and no doubt continuing to plot attacks abroad including in Europe and the US."
Ultimately, the problem comes down to this. Unless there is a secure and humane resolution to the issue of those thousands displaced by the collapse of the IS caliphate then this will be a ticking time bomb that Europe and other parts of the world will live to regret.