Britain will appeal against a court ruling ordering it to publish secret US intelligence documents related to the alleged torture of a former Guantanamo Bay inmate, it said.
Binyam Mohamed, an Ethiopian-born British resident, was arrested in Pakistan in 2002 on suspicion of links to extremists and spent six-and-a-half years in US custody in Morocco, Afghanistan and Guantanamo Bay.
His lawyers are seeking the release of information they say will show that Britain knew he was being tortured during his time in US custody in Morocco, a claim which is strongly denied by officials here.
Both Britain and the US spoke out against the ruling.
Foreign Secretary David Miliband said he was "deeply disappointed" and warned the judgment could cause the United States to limit the information it shared with Britain in future.
"The government is deeply disappointed by the judgment handed down today by the High Court which concludes that a summary of US intelligence material should be put into the public domain against their wishes," Miliband said.
"We will be appealing in the strongest possible terms."
Meanwhile, US State Department spokesman Ian Kelly said: "We are not pleased", adding that Washington kept such information confidential "to protect our own citizens".
Mohamed was taken to the US detention camp at Guantanamo Bay in 2004 and released in February this year, the first detainee to be freed under US President Barack Obama, who has pledged to close the camp.
He himself says it is of vital importance that the material is released to back up his claims of having suffered "medieval" torture.
"The public needs to know what their government has been up to for the last seven years," Mohamed told the BBC.
"There's information in there, which I'm 99 percent sure, states that the US sub-contracted the UK government to do its dirty work."
Clive Stafford Smith, director of Reprieve, a legal rights charity acting for Mohamed, agreed.
"The judges have made clear what we have said all along -- it is irrational to pretend that evidence of torture should be classified as a threat to national security," he said.
"All along, the government has been trying to conflate national security with national embarrassment, nothing more, nothing less."
Mohamed was suspected of attending an Al-Qaeda training camp in Afghanistan and of plotting to build a radioactive "dirty bomb", but was never charged.
Miliband said the "fundamental question" was not the information itself but the risks its publication posed to intelligence-sharing arrangements.
"I've very happy for the documents to be published -- but not by us, by the Americans," he told Sky News television.
In a statement responding to the court ruling, he added: "The US will not prejudice its own intelligence if it perceives that this intelligence may be disclosed at the order of a foreign court or otherwise.
"It remains my assessment that the consequence of the court's judgment today, if left unchallenged, will be a restriction on what is shared with us."
The US intelligence was contained in seven paragraphs that were edited out of a judgment about Mohamed last year at the British government's request, but judges John Thomas and David Lloyd Jones reversed this decision Friday.
"As the risk to national security, judged objectively on the evidence, is not a serious one, we should restore the redacted paragraphs to our first judgment" in August 2008, they said.
The ruling came the day after the head of Britain's MI5 security service, Jonathan Evans, defended working with foreign agencies while insisting Britain did not collude in torture.
He said his service had faced a "real dilemma" about working with some foreign agencies but "would have been derelict in our duty" if it had not, in the aftermath of the September 11, 2001 attacks on the United States.