There they were, side by side in Hatchards bookshop on the very day that the Supreme Court released its judgment in Rahmatullah v Secretary of State for Foreign and Commonwealth Affairs. Eliza Manningham-Buller’s Reith Lectures (Securing Freedom, Profile Books) and Ian Cobain’s Cruel Britannia: a secret history of torture (Portobello) were united by the demands of commerce despite the distance between the former head of MI5 and the Guardian’s investigative journalist. As for Mr Rahmatullah, he was unable to be present, in person or in writing, having been detained for many years in Afghanistan beyond the reach even of habeas corpus issued by the Court of Appeal.

The point in issue between Lady Manningham-Buller and Mr Cobain is illustrated in two sentences of the former’s book: ‘I am proud my Service refused to turn to the torture of high-level prisoners in the second world war... So that, if not then, why should it be justified now.’ Mr Cobain says that this is humbug. We developed the ‘five techniques’ of torture for which we were condemned in a celebrated Strasbourg case (starvation, sleep deprivation, hooding, ‘white noise’ and ‘wall-standing’, all enforced by good, old-fashioned violence) at the ‘London Cage’ in Kensington Palace Gardens – precisely against assorted suspected fifth columnists and spies during the war.

We transported the techniques around the world as we withdrew from empire; redeployed them in Iraq despite a promise to desist; and connived with the Americans as well as sundry other unsavoury regimes as they developed our practices or deployed another that we also piloted – simulated drowning.

Mr Cobain’s case has the advantage of backing from recently released archive material. It sounds pretty plausible. One detainee in an MI5 unit in Germany swallowed a spoon to end the torture. He also lost four toes on his right foot from frostbite as he was forced to sleep in a cell deliberately kept freezing and wet. Mr Cobain’s book requires reconsideration of the comforting story of our success in ‘turning’ German agents during the war. We did it efficiently and at speed; it was important for the defence of the realm. But we did not do it through applying the fair play standards of cricket. We tortured and we repeated this in colonial conflicts from Malaya through to Aden and Northern Ireland.

The link between this history and Mr Rahmatullah is not torture, at least overtly. It is secrecy. Mr Rahmatullah was captured by British forces in Iraq back in 2004. Reprieve, the charity led by the indefatigable Clive Stafford-Smith, finally established that he had been handed over to the Americans and taken to Afghanistan. The UK government was not over-helpful in allowing Reprieve to track him down. When Reprieve finally did, the UK then resisted a habeas corpus application designed to get him produced to the court. Who knows what he would have said of the conditions of his incarceration?

The return of Mr Rahmatullah should have been simple. The UK had the foresight to agree a ‘memorandum of understanding’ with the US under which transferred detainees would be returned after any subsequent request. This was necessary, a Mr Parmenter from the Ministry of Defence urbanely explained to the court, because of ‘the known US position on the Geneva Conventions’.

This was to the effect that the US denies the application of the said conventions in relation to ‘enemy combatants’ and, furthermore, makes a somewhat tenuous distinction between torture and ill-treatment, once advanced by the British, to sanction waterboarding, the ‘five techniques’ and assorted violence.

William Hague, as foreign secretary, was remarkably loth to trouble the Americans with a request that tested the memorandum of understanding. He only did so after the Court of Appeal gave him no choice. He did not seem too distressed either by the Americans’ negative response. They told him that they had already earmarked Mr Rahmatullah for the Pakistanis, so the Brits could back off. Two Supreme Court justices, Lady Hale and Lord Carnwath, thought the foreign secretary more than somewhat pusillanimous and felt he should try again, and harder.

The problem is the subtext which might occur even to those who are not conspiracy theorists but who are our enemies. They will assert that we are conniving with the Americans, whom we know perfectly well are using methods of interrogation which amount to torture. We sign MoUs which we know will be unenforceable. You can see why we might well be seen more as Mr Cobain’s perfidious Albion than the upright bastion of liberty advanced by Lady Manningham-Buller. And this is particularly so given the final element of the UK’s response: the attempted imposition of ‘closed material procedures’ in the Justice and Security Bill which will sweep cases like Mr Rahmatullah’s right under the carpet.

Roger Smith is visiting professor at London South Bank University