US military authorities tried to persuade Binyam Mohamed, the UK resident held in Guantánamo Bay, to sign a statement saying he had never been tortured in return for his release, it emerged yesterday.

He would also have had to plead guilty to terrorist offences that he did not commit, drop his demand to see documentary evidence showing he was telling the truth, and promise not to speak to the media or sue the US or UK for any wrongdoing.

The terms of the attempted plea bargain were kept secret. They have been disclosed by Lord Justice Thomas and Mr Justice Lloyd Jones in the wake of Mohamed's recent release. He returned to Britain last month.

The high court papers show that the US government made it clear it would seek a minimum 30-year jail sentence if Mohamed was found guilty by a military court. If he was acquitted, he was still to be detained as an "enemy combatant".

The papers reveal that a draft plea agreement was sent "with the invitation that BM [Mohamed] sign it", in October 2008, the very time the US authority responsible for drawing up indictments for military trials dismissed the charges against him. Abandoned charges included claims that Mohamed planned to build a "dirty bomb".

As part of the plea bargain, Mohamed would have had to agree "not to participate in or support in any manner any litigation or challenge, in any forum, against the United States or any other nation or any official of any nation".

If he applied for the release of the documents that his defence lawyers are still demanding, then the plea offer would be cancelled, according to the proposed deal. The US officially denies that Mohamed was tortured and refuses to disclose where he was for two "missing years" - now known to be 2002 to 2004, when he was being held in Morocco.

David Miliband, the foreign secretary, is still insisting that documents the high court says contain "powerful evidence" about Mohamed's treatment should remain secret. The two high court judges expressed surprise last month that "a democracy governed by the rule of law", such as the US, would expect a court in another democracy to "suppress" evidence relating to torture allegations, "politically embarrassing though it might be".

Clare Algar, executive director of Reprieve, the legal charity that represents Mohamed and more than 30 other Guantánamo detainees, said: "Offering a man who is protesting his innocence freedom on the condition that he pleads guilty to something and serves a 10-day sentence is face-saving on a horrific scale."