GUANTÁNAMO BAY, Cuba — They first met at a secret C.I.A. prison in March 2003. Khalid Shaikh Mohammed was believed by his captors to be a senior Qaeda operative who might have information that could save American lives. James E. Mitchell was a psychologist working as a contractor for the intelligence agency who had helped develop what was euphemistically known as “enhanced interrogation techniques” — a program of torture.
Over 15 days, a three-man team that included Dr. Mitchell waterboarded Mr. Mohammed 183 times.
On Tuesday, Dr. Mitchell is scheduled to walk into the military courtroom at Guantánamo Bay where Mr. Mohammed and four other men are charged with helping to plot the Sept. 11, 2001, attacks that killed nearly 3,000 people. With Mr. Mohammed present, he will take the stand to testify during a pretrial hearing about the interrogation program, answering questions under oath from defense lawyers.
For at least the start of the hearing, when attendance by the defendants is mandatory, Mr. Mohammed will be sitting at his defense table 25 feet from Dr. Mitchell, their first encounter in a courtroom. And for the first time, the psychologist will be the one answering the questions while Mr. Mohammed and the other defendants, who spent up to four years in the C.I.A. black sites, will be the ones watching.
In 2002, Dr. Mitchell and a fellow psychologist, John Bruce Jessen, devised the program of violence, sleep deprivation and humiliation that the C.I.A. would employ on detainees. Defense lawyers say all five men charged with conspiracy in the 9/11 attacks were tortured using some of those now-outlawed measures. The defendants all face the death penalty.
Mr. Mohammed’s co-defendants were subject to violence, sleep deprivation, dietary manipulation and rectal abuse in the prison network from 2002, when the first of them, Ramzi bin al-Shibh was captured, to 2006, when all five were transferred to the prison at Guantánamo Bay. They will also be present in the courtroom.
In the black sites, the defendants were kept in solitary confinement, often nude, at times confined to a cramped box in the fetal position, hung by their wrists in painful positions and slammed head first into walls. Those techniques, approved by George W. Bush administration lawyers, were part of a desperate effort to force them to divulge Al Qaeda’s secrets — like the location of Osama bin Laden and whether there were terrorist sleeper cells deployed to carry out more attacks.
A subsequent internal study by the C.I.A. found proponents inflated the intelligence value of those interrogations.
The psychologists were called by lawyers to testify for one of the defendants, Mr. Mohammed’s nephew, Ammar al-Baluchi. All five defense teams are expected to question them about policy and for graphic details of conditions in the clandestine overseas prisons, including one in Thailand that for a time was run by Gina Haspel, now the C.I.A. director.
Mr. al-Baluchi’s lawyer, James G. Connell III, is spearheading an effort to persuade the judge to exclude from the trial the testimony of F.B.I. agents who questioned the defendants at Guantánamo in 2007. It was just months after their transfer there from years in C.I.A. prisons, and the defense lawyers argue that, although there was no overt violence during the F.B.I. interrogations, the defendants were so thoroughly broken in the black sites that they were powerless to do anything but tell the F.B.I. agents what they wanted to hear.
By law, prosecutors can use voluntary confessions only at the military commissions at Guantánamo.
Dr. Mitchell has described waterboarding and other violence as well as sleep deprivation and forced nudity as part of a program of “conditioning” captives to cooperate that has no long-lasting effect on them.
Dror Ladin, a lawyer with the American Civil Liberties Union, called the circumstances of the testimony “very strange” and “very extraordinary.”
He said “torture survivors,” the Sept. 11 defendants, will be watching “the men who tortured them testify as witnesses in a trial that will decide whether the defendants will be put to death in part based on the testimony of the very same people who tortured them.”
Mr. Ladin was part of a legal team that filed a civil lawsuit and then reached a confidential settlement with Dr. Mitchell and Dr. Jessen on behalf of three foreign men who were held in a C.I.A. prison in Afghanistan and interrogated using some of the methods they drew up. One of them died in custody.
Dr. Mitchell said at the time that it was “regrettable that one guy died and those other guys were treated badly.” But he said he and Dr. Jessen “were not responsible for it.”
“They say we are,” he added, “but in my view, they’re wrong.”
It is not known when the defendants last saw the psychologists, who spent years in the black sites and offered advice on interrogation techniques to the C.I.A. as late as 2007, according to a Senate Intelligence Committee study of the program.
Dr. Mitchell and Dr. Jessen started off as contract consultants to the C.I.A. and went on to waterboard three other prisoners now at Guantánamo in addition to Mr. Mohammed, starting with a Palestinian man called Abu Zubaydah. By 2005, they set up a business, Mitchell Jessen and Associates, that grew to provide all of the contract guards at the black sites and 80 percent of the agency’s interrogators. The United States government paid the business $81 million for their services.
Mr. Zubaydah, who has never been charged or convicted of a crime, is an indefinite detainee at Guantánamo in the same prison as Mr. Mohammad and the others. He recently drew sketches of the application of the interrogation techniques in clinical detail.
It is unclear how much of the testimony the public or the defendants will get to see.
The C.I.A., through the prosecution, still controls the classified information surrounding the black sites — including their locations and the identities of most people who worked there, as well as deciding who can testify and what they can divulge.
The Sept. 11 case prosecutors have periodically invoked a national security privilege to prevent the public and the defendants from hearing some information. And in closed national security sessions, they have invoked the privilege to prevent the judge and the defense lawyers from hearing some information.
The judge, Col. W. Shane Cohen of the Air Force, ultimately has to decide whether the government has shielded so much information it would prevent the defendants from getting a fair trial and, if so, how to provide balance before the trial’s start, which is scheduled for Jan. 22, 2021, with jury selection. Remedies could include dropping the death penalty as a possibility or dismissing the charges.
Trial lawyers in the case have been preparing for the high-stakes hearing for months, with defense teams reviewing Dr. Mitchell’s media appearances and his book, “Enhanced Interrogation,” and studying the depositions both men gave in 2017 in the A.C.L.U. lawsuit.
“They were among the founding fathers of the torture program,” said Walter B. Ruiz, the lawyer for Mustafa al-Hawsawi, one of the defendants.
Mr. Ruiz said questioning the men should be quite challenging because, as psychologists and interrogators, Dr. Mitchell and Dr. Jessen “are all about reading people and eliciting answers.”
“This is what we’re going to be doing,” he added. “This is about switching roles a little bit.”