Two senior judges today launched a scathing attack on the US authorities over their suppression of evidence of allegations of torture of a British resident.
But the judges decided not to release the evidence because the US had threatened to withdraw cooperation over terrorist intelligence and "the public of the United Kingdom would be put at risk".
In a joint judgment involving terror suspect Binyam Mohamed, Lord Justice Thomas and Mr Justice Lloyd Jones said: "In the light of the long history of the common law and democracy which we share with the United States it was in our view difficult to conceive that a democratically elected and accountable government could possibly have any rational objection to placing into the public domain such a summary of what its own officials reported, as to how a detainee was treated by them and which made no disclosure of sensitive intelligence matters.
"Indeed we did not consider that a democracy governed by the rule of law would expect a court in another democracy to suppress a summary of the evidence contained in reports by its own officials ... relevant to allegations of torture and cruel, inhumane, or degrading treatment, politically embarrassing though it might be.
"We had no reason ... to anticipate there would be made a threat of the gravity of the kind made by the United States Government that it would reconsider its intelligence sharing relationship, when all the considerations in relation to open justice pointed to us providing a limited but important summary of the reports."
In another part of the ruling, the judges said they had been informed by lawyers for Foreign Secretary David Miliband that the threat to withdraw co-operation remained even under President Barack Obama's new administration.
The former shadow home secretary David Davis demanded a Commons statement from the Government on the ruling, calling it "a matter of utmost national importance".
He said the ruling implied that Mohamed had been tortured, and British agencies were complicit in that torture.
He said: "The ruling implies that torture has taken place in the Mohamed case, that British agencies may have been complicit, and further, that the United States Government has threatened our High Courts that if it releases this information, the US Government will withdraw its intelligence cooperation with the United Kingdom.
"The judge rules that there is a strong public interest that this information is put in the public domain even though it is politically embarrassing."
He told the BBC: "The Government is going to have to do some pretty careful explaining about what's going on."
Mohamed, 31, was arrested in Pakistan in 2002 and has been held by the US at Guantanamo Bay since September 2004. He alleges the evidence against him is based on confessions extracted by torture and ill treatment - claims denied by the US authorities.
Last August the same two judges said in their initial ruling that MI5 had participated in the unlawful interrogation of Mohamed, an Ethiopian national.
They held that the UK Government was under a duty to disclose evidence which it held about the treatment of Mohamed after his detention in Pakistan.
But the court's judgment at that time did not disclose the details supplied by the US intelligence services pending further argument over the security issues involved.
Today the judges were giving their ruling on an application by the media for those details to be restored to the original judgment and made public.
The judges said: "The suppression of reports of wrongdoing by officials (in circumstances which cannot in any way affect national security) would be inimical to the rule of law and the proper functioning of a democracy.
"Championing the rule of law, not suppressing it, is the cornerstone of a democracy."
But they said that in the opinion of the Foreign Secretary there is a real risk that, if the redacted paragraphs were restored, then "the US Government, by its review of the shared intelligence arrangements, could inflict on the citizens of the United Kingdom a very considerable increase in the dangers they face at a time when a serious terrorist threat still pertains".
They said they had to find a balance between national security on the one hand and the public interest in open justice, safeguarding the rule of law, free speech and democratic accountability.
"In the circumstances now prevailing, the balance is served by maintaining the redaction of the paragraphs from our first judgment," they said.
"In short, whatever views may be held as to the continuing threat made by the US Government to prevent a short summary of the treatment of Mohamed being put into the public domain by this court, it would not, in all the circumstances we have set out and in the light of the action taken, be in the public interest to expose the UK to what the Foreign Secretary still considers to be the real risk of the loss of intelligence so vital to the safety of our day-to-day life."
It was up to the US Government to consider changing its position or itself putting that information into the public domain.
Mr Davis, who raised the ruling on the floor of the Commons, said that the Americans had no right to interfere in the British courts.
"It is none of their business what the courts do. They should not seek in any circumstances to put pressure on British courts," he told the BBC News channel.
"That is completely beyond the rule of law, they should understand it, their courts are similar to ours."
He said that Foreign Secretary David Miliband should now "come clean" about what had been going on and the involvement of the British intelligence agencies.
"All the rumours are that it actually does show some degree of complicity by the UK and US governments," he said.
"The question has come about that one of our agencies - MI5, MI6, whoever - have known about torture being used against people like that (Mohamed), has used information arising from torture, all of those sorts of issues.
"We want the plain truth out of the Government."
He urged Mr Miliband to go back to the new US administration to ask it to lift its objections to the release of the material.
Clive Stafford Smith, Mohamed's lawyer and director of Reprieve, said the UK and US governments had a duty to investigate torture and not suppress evidence that it happened.
By not disclosing the evidence, the UK was guilty of "capitulation to blackmail", he said.
"The US is under a legal duty to investigate the crime of torture, not to suppress evidence that it happened," he said.
"And the UK has a similar duty. For the Foreign Secretary to give in to these illegal demands by the Bush administration is capitulation to blackmail, pure and simple.
"It is hardly Britain's finest hour. As the judges say, it is up to President Obama to put his money where his mouth is. He must repudiate his predecessor's reprehensible policy."
Shami Chakrabarti, director of human rights group Liberty, called for ministers to launch an inquiry into Britain's alleged role in rendition and torture.
She said it was "alarming and surprising" that the new US administration maintained the threat against the Foreign Office.
She said: "Despite best efforts to shine a light on the grubbiest aspects of the 'war on terror', the Foreign Office has claimed that the Obama administration maintained a previous US threat to reconsider intelligence-sharing unless our judges kept this shameful skeleton in the closet.
"We find this Foreign Office allegation about the new presidency surprising and alarming and it must be substantiated without delay."
"There is no moral or practical argument against an immediate public inquiry into Britain's role in rendition and torture.
"A wise minister would establish an inquiry tomorrow rather than risk being dragged there by the courts."
Mohamed was originally charged with involvement in a "dirty bomb" plot but that was withdrawn and the US authorities said new charges might be brought.
But no fresh indictment was filed and on January 22 President Obama issued an executive order that no new charges should be sworn, pending a review of the position of all those detained at Guantanamo Bay.
Amnesty International backed calls for an inquiry into allegations the UK was complicit in torture.
Amnesty UK Director Kate Allen said: "On top of allegedly suffering torture, Binyam has been held in harsh conditions for over six years and his physical and mental health have declined alarmingly.
"Amnesty has always believed that it has been absolutely deplorable that the UK government has fought to stop documents on Binyam's case coming to light.
"There now needs to be an independent inquiry into allegations that the UK has in some way been complicit in this man's torture and the wider practice of rendition and secret detention.
"In addition to expediting the release of documents, we're calling on the Foreign Secretary David Miliband to re-double his efforts to secure the immediate release of Binyam from Guantanamo.
"We also want the UK government to press for the release of Shaker Aamer and Ahmed Belbacha, two other men with long-standing links to the UK."