We don’t know why Jamal al-Harith, formerly named Ronald Fiddler, was in Afghanistan in 2001. We know that he claimed to have been on holiday, travelling from Pakistan to Iran – an odd choice of destination at best. We know that when the Northern Alliance captured Kandahar, a journalist found him in prison there. He claimed to have been arrested by the Taliban on suspicion of being a British spy.

We also know that his repatriation to the UK was cancelled, and he was instead detained and interrogated by US forces. He was then transferred to Guantanamo Bay, where he spent two years before being released back to the UK.

It is at this point that the tale turns embarrassing. al-Harith’s Guantanamo file, since released via Wikileaks, records that some officers believed he was not affiliated to either Al Qaeda or the Taliban, but that other intelligence reported he had travelled to Sudan in 1992 with a “well-known” operative for Bin Laden’s organisation. The file also contains a suspicion that he was concealing other Middle Eastern travel for some reason, including to Saudi Arabia.

Without sufficient evidence to charge him, and on the back of an ardent campaign by various UK politicians and newspapers, he walked free on his arrival back in Britain. In 2010, a court case brought by al-Harith and other former Guantanamo detainees seeking damages for alleged MI6 involvement in mistreatment and torture in Guantanamo was settled by the Coalition Government. He reportedly received £1 million in compensation, though as the settlement was subject to a gagging clause we will never know the precise amount.

Despite his protestations of innocence – or because of his Guantanamo experience, depending on your view – by 2014 he was clearly a confirmed terrorist. He slipped into ISIS territory and joined the group – perhaps even taking his taxpayer-funded compensation pot with him. Now it is reported that he is dead, having either carried out or attempted to carry out a suicide bombing against coalition forces in Iraq.

It’s a story that has left a wide variety of people shielding their faces in the hope of avoiding a huge dousing of egg. The Daily Mail lashed out at the Blair Government for securing his release and for his eventual compensation. Tony Blair retorted that the Mail had itself campaigned for his release, and that it was Cameron’s Coalition, not he, who signed off the compensation payout. Others wonder how the security services managed to allow such a well-known figure to join ISIS when they are supposed to be on watch for just such eventualities.

Undoubtedly it’s a tale of a series of errors – there’s no other way that a taxpayer-funded millionaire known to the security services could end up as a suicide bomber in Iraq. But before allocating blame, we need to consider if each decision could have been taken any other way.

Yes, it was hugely dubious that a British citizen would be in Kandahar under Taliban rule – as Blair put it in 2004 “at the very least, there are issues that need to be resolved, let us say, in respect of those individuals”. But we have to work on the basis of evidence, not just suspicions. Military internment as a POW was already difficult given the irregular nature of Taliban forces – and this particular man’s presence in a jail cell further confused the question of whether or not he was an enemy combatant.

Sending him to Guantanamo in the first place, and then subjecting him to a variety of tortures, was a highly dubious call. Had there been actual evidence confirming that he was a terrorist, he could and would have been tried. There wasn’t, so he was packed off into a brutal limbo which failed utterly to clarify matters. Two years of “enhanced interrogation” – the approach that “works”, according to Donald Trump – only had one of two effects. At worst it turned him from a wrongheaded radical into an extremist (a claim his family deploy, though not one that I believe), or at absolute best it lent his pre-existing extremism the cover of victimhood.

Without sufficient evidence to convict, what were authorities to do? We apply the rule of law in the West – mostly – and you can’t go round disappearing and torturing everyone who attracts suspicion but for whom the evidence is too weak. If you do so, you still have to do something with them in the longer term – as happened when al-Harith was released.

On his release, the British authorities were still hamstrung by the original problem that took him to Guantanamo in the first place: the evidence wasn’t conclusive enough to charge and convict him. Like it or not, they had no option but to let him go – on the proviso that the security services would keep a watchful eye. That they evidently failed to watch closely enough doesn’t change the fact that a law-abiding government had no option in law to imprison him further.

The question of the compensation payment is just as vexed. It’s all very well for Blair to criticise the Coalition’s decision to settle the case, but he neglects to consider that the case arose from his decisions in the first place. If his policy with regard to the War on Terror hadn’t legitimised the internment of al-Hadith and others in Guantanamo, the case would never have arisen. Similarly, if MI6 were complicit in torture as was alleged, then it was under Blair that they were doing so – again, had he forbidden it then the claims could never have proceeded so far.

Lord Carlisle, the former reviewer of terror legislation, told the BBC that the compensation wasn’t deserved as “plainly he was a terrorist”, but that the Government had to pay out to avoid evidence about national security work being disclosed by the claimants in court. Again, once that dilemma existed what else could have been done within the law?

There were two moments at which this farce could have been avoided. Neither of them are on his release in 2004, or at the point of the settlement in 2010, which have attracted most coverage so far.

The first was when he was sent to Guantanamo in the first place. Evidently that approach – driven by a desperate search for legal loopholes – not only failed to extract the truth, but backfired in handing him the opportunity to bring a costly legal case. It was an unprecedented situation, but alternatives that worked better and fell within the rule of western law should have been found.

The second chance to derail this sorry tale was when he escaped to join ISIS in 2014. We are supposed to have systems in place to monitor persons of interest and prevent them doing exactly that – how we evaded them is yet to be explained. If anything,this is the most troubling error of the whole saga – there are hundreds of others who want to join ISIS in Iraq and Syria, almost all of whom are far less well-known to the authorities than al-Harith. If they couldn’t stop a former Guantanamo inmate from going, how sure can we be that they are stopping people who have never even picked up a fine for littering, and who therefore don’t appear on any databases at all?