But even though some of what the government did to Mr. Nashiri has become public, including through the partial declassification of a 2004 C.I.A. inspector general report and the release in 2014 of the executive summary of a Senate Intelligence Committee report about the interrogation program, many details have remained classified.
Among the newly disclosed details, the court filing showed that Mr. Nashiri was locked inside a coffin-like box for days. While it was known that confinement in cramped spaces was one of the torture techniques the C.I.A. had approval to use at its black-site prisons, it was not previously known that Mr. Nashiri was among the detainees subjected to it.
The latest filing also discloses that photographs exist of the waterboard setup that the C.I.A. used with Mr. Nashiri and at least two other prisoners, although the photographs were not revealed.
And government censors left unredacted details from a classified psychological examination of Mr. Nashiri that was conducted in 2012 as part of the commission case against him. It showed that his mental breakdown in response to the torture had long-term effects, including his continuing nightmares and other signs of post-traumatic stress.
“He developed a phobia of water and, when showering, kept the water pressure low,” the filing stated, citing the psychological review. “For approximately one year after being publicly transferred” from the C.I.A. black-site program “to Guantánamo in 2006, he avoided leaving his cell altogether.”
Lawyers for Mr. Nashiri have been pursuing a lawsuit in the federal court system asking judges to block the government from prosecuting him before a military commission, rather than in civilian court. The argument centers on the idea that the bombings of the Cole and the French oil tanker did not take place in a wartime context, and so it is improper to use a military war-crime court to address them.
In August, a three-judge panel on the United States Court of Appeals for the District of Columbia Circuit rejected Mr. Nashiri’s lawsuit by a 2-to-1 vote, with the majority ruling that the pending commission proceedings had to run their course first and then Mr. Nashiri could raise the issue on appeal, assuming he is convicted. His lawyers are appealing to the Supreme Court, again seeking an order to shut down the commission trial.
Their petition and an attached appendix include a significant amount of information about what happened to Mr. Nashiri, drawn from classified summaries turned over to his defense team in the commission case. Large amounts of that material remained redacted.
The uncovered portions showed that Mr. Nashiri’s defense team also drew heavily from a recently published book, “Enhanced Interrogation: Inside the Minds and Motives of the Islamic Terrorists Trying to Destroy America,” by James E. Mitchell, one of two psychologists whom the C.I.A. hired to design its interrogation program.
Mr. Mitchell’s book defended the program as he and the other psychologist, Bruce Jessen, had designed it, but portrayed C.I.A. officials as sometimes deviating from it — and from limits set by the Justice Department — to inflict more extreme physical abuse on detainees that the psychologists did not condone.
Some of those details, which have not been included in declassified government documents to date, were also included in the Supreme Court petition.
For example, Mr. Mitchell described watching C.I.A. officials make Mr. Nashiri kneel, put a broomstick behind his knees and force his body backward until “he began to scream” — because, the petition said, the technique was pulling his knee joints apart.
Another passage from the book highlighted in the petition described the use of a stiff-bristled brush to scrub Mr. Nashiri’s anus and scrotum “and then his mouth.”
Separately, the military judge overseeing the commission case against Mr. Nashiri has apparently issued an order authorizing the defense team to call Mr. Jessen and Mr. Mitchell as witnesses. The defense strategy in that case is to argue that the government should not be permitted to execute Mr. Nashiri because it tortured him.
In yet another case, other former C.I.A. detainees are suing Mr. Mitchell and Mr. Jessen. Earlier this month, the Trump administration asked a judge to block the two psychologists’ request for testimony from several top C.I.A. officials, including Gina Haspel, the deputy director, arguing that asking her questions about the topic would endanger state secrets.