The high court today flatly rejected claims by David Miliband, the foreign secretary, that releasing evidence of the CIA's inhuman and unlawful treatment of UK resident Binyam Mohamed would harm Britain's relations with the US by giving away intelligence secrets.

Evidence that the foreign secretary also wants to suppress is believed to reveal what British intelligence officers knew about Mohamed's treatment. Mohamed, 31, an Ethiopian, says he was tortured in Pakistan, Morocco, Afghanistan, and Guantánamo Bay.

In the sixth in a string of damning rulings, the high court accused Miliband of wanting to suppress information about CIA activities even though details had already been disclosed by the Obama administration. Dismissing Miliband's claims, Lord Justice Thomas and Mr Justice Lloyd Jones insisted they were not trying to give away "American secrets". They said: "Of itself, the treatment to which Mr Mohamed was subjected could never properly be described in a democracy as 'a secret' or an 'intelligence secret' or 'a summary of classified intelligence'."

The judges revealed that seven paragraphs in a key document Miliband insists must remain secret "relate to admissions of what officials of the US did to BM during his detention in Pakistan". They repeated their earlier finding that "what is contained in those seven redacted paragraphs gives rise to an arguable case of torture or cruel, inhuman and degrading treatment".

The court has heard that a British security service officer interrogated Mohamed in Pakistan and officials passed information about him to the CIA. It was clear, the judges said, that the relationship of the UK to the US in connection with Mohamed "was far beyond that of a bystander or witness to the alleged wrongdoing".

In one stinging passage, the judges said yesterday the foreign secretary "was not prepared either to produce evidence or address argument to us".

Evidence that Miliband still wanted kept secret related to the question why "it was impossible to believe that President Obama would take action against the United Kingdom", and "why publication ... is necessary to uphold the rule of law and democratic accountability", the judges said.

They revealed that one passage the foreign secretary had now agreed could be disclosed referred to a memo from Jay Bybee, US assistant attorney general, to John Rizzo, acting CIA general counsel, which, the judges said, "made clear that the techniques described were those employed against Mr Zubaydah, alleged to be a high-ranking member of al Qaida." The judges said the remainder of the paragraph, which remains redacted from public versions of their rulings, was a "verbatim quote" from a memo made public in the US seven months ago.

The Bybee memo was written in 2002, the year Mohamed was arrested. It sought to justify as legal, and not regarded as torture, such treatment meted out to Abu Zubaydah as temperature extremes, music played at debilitating volumes, and sexual humiliation. Zubaydah was also subjected to beatings, isolation, wall standing, continuous cramped confinement, sleep deprivation, and waterboarding.

The judges yesterday appeared to invite a comparison between the treatment of Zubaydah and Mohamed. They referred to another piece of evidence Miliband wanted kept secret which, they said, was "consistent with the publication of the CIA interrogation technique memoranda".

It was necessary to stand back and ask "whether President Obama would curtail the supply of information to the United States' oldest ally when what was put into the public domain was not intelligence".

The judges added: "It is difficult … to see any grounds for rejecting the submission of Mr Mohamed, the UK media and the international media that there is no evidence of any real risk of serious harm to the national security of the UK."

The legal charity Reprieve tonight accused Miliband of using "Alice in Wonderland" argument to suppress the details of the torture of Mohamed even though those details were in the public domain. "The high court judges were scathing about the foreign secretary's view that publishing torture methods poses a risk to national security," it said.

A Foreign Office spokesperson said: "We are appealing the judgments ... The issues go to the heart of the UK's intelligence sharing relationship with other countries and efforts to defend UK security."

The judges revealed that the foreign secretary had so far agreed to pay Mohamed's costs up to September last year amounting to more than £189,000.