The psychologists produced a memo in 2002 proposing harsh techniques to be used on terrorism suspects thought to be resisting interrogations. The C.I.A. adopted nearly all of these methods, including waterboarding, stuffing prisoners into small boxes, forcing them to hold painful positions for hours and slamming them into flexible walls.

The so-called enhanced interrogation techniques were based on those used in military survival schools to simulate what service members might undergo if captured by regimes violating the laws of war. They were later condemned as illegal under United States and international law and were ultimately banned. The American Psychological Association consequently prohibited its members from participating in national security interrogations.

As a candidate, President Trump said he would bring back waterboarding “and a hell of a lot worse,” but later said he would defer to Defense Secretary Jim Mattis’s strong opposition — widespread in the military — to torture and prisoner mistreatment.

The case against the psychologists proceeded despite multiple attempts by their lawyers to have it dismissed. They argued that the men acted solely under the authority of the government and were entitled to the same immunity as government officials. The judge, Justin L. Quackenbush, also denied motions by both sides requesting that he rule summarily in their favor before a trial.

Although there will be no public trial, the case — over its nearly two-year course — expanded public knowledge about the C.I.A.’s torture program. Previously secret documents were declassified, including C.I.A. cables from the covert prisons known as black sites. And the two psychologists, along with the former C.I.A. officials Jose Rodriguez and John Rizzo, were subjected to lengthy questioning by opposing lawyers in video depositions. Their sometimes sterile description of the techniques contrasted with the emotional accounts, in separate depositions, of the men who underwent them.