President Trump made history Tuesday by choosing a woman, Gina Haspel, to be the next CIA director, but in the process he also dredged one of the darkest hours in the agency’s history: The torture of terror suspects at secret prisons after 9/11.

Haspel — who is set to replace current chief Mike Pompeo, who in turn replaces the fired Rex Tillerson as Secretary of State — oversaw one of the CIA’s most brutal interrogations and was later involved in destroying videotapes of the torture.

Haspel requires confirmation from the Senate before she can take the CIA’s top job, and she’s likely to face stiff opposition from Democrats and civil liberties groups, including the ACLU, which sued the government over its “enhanced interrogation” program. The lawsuit revealed many grisly details about the torture program, including some information about the key role that Haspel played in perhaps the most infamous case of detainee torture.

“She was up to her eyeballs in torture”

“She was up to her eyeballs in torture: both in running a secret torture prison in Thailand, and carrying out an order to cover up torture crimes by destroying videotapes,” said Chris Anders, deputy director of the ACLU’s Washington legislative office. “One man held at the secret prison she ran was waterboarded 83 times, slammed against walls, sleep deprived, and locked in a coffin-like box.”

Anders is referencing the case of Abu Zubaydah, an al-Qaeda suspect who was detained in Pakistan in March of 2002. He was initially suspected of being the terrorist organization’s third or fourth in command after Osama bin Laden, though the Senate’s 2014 report on CIA torture concluded that he wasn’t even a member of the group. He is still being held at the detention center in Guantanamo Bay.

A spokesperson for the CIA declined to comment on-the-record about Haspel’s involvement in the agency’s enhanced interrogation program, and referred questions to the White House, which did not immediately respond to an inquiry about the nomination.

VICE News reviewed a CIA document, once marked “top secret” but declassified and released in December 2016 as part of the ACLU’s lawsuit against the so-called architects of the CIA torture program, that details the techniques used against Zubaydah and other detainees. The document (embedded below) also offers a chronology of how the program shifted amid pushback from Congress and questions from some members of the intelligence community about its effectiveness.

The Central Intelligence Agency's "Chronology of CIA High-Value Detainee Interrogation Technique"

The document describes Zubaydah’s case and notes that when he was captured in early 2002, “there was no CIA interrogation program and the only techniques being used were sleep deprivation, dietary manipulation, and loud music/white noise.” The CIA believed that Zubaydah was withholding information about al-Qaida plots and “sought to develop other, effective, and legal techniques to use.” These included the use of “stress positions,” waterboarding, “cramped confinement,” and “use of harmless live insects,” which the document notes was never actually utilized.

While the CIA maintained that these techniques did not amount to torture, the document states that the list of acceptable tactics to use on detainees was “curtailed for prudential reasons to avoid to avoid putting CIA officers in jeopardy of vexatious civil or criminal litigation.”

One of those presumably exposed to legal risk was Haspel. She was the “chief of base” at the black site in Thailand where Zubaydah was held and tortured. The details of his ordeal have been thoroughly reported elsewhere, including by ProPublica, which used declassified documents, Zubaydah’s own account of his ordeal, and books by ex-CIA officials to assemble what the investigative news organization called “the fullest public account of Haspel’s role in the questioning of Zubaydah.”

According to CIA cables and other documents reviewed by ProPublica, Haspel watched as “Zubaydah vomited, passed out and urinated on himself while shackled.” Once while he was being waterboarded, Zubaydah “lost consciousness and bubbles began gurgling from his mouth,” and he had to be revived by medical personnel. Haspel reportedly allowed the most interrogations to continue for nearly three weeks even as CIA headquarters was notified that Zubaydah had not “provided any new threat information or elaborated on any old threat information.” While he was detained by the CIA, Zubaydah lost vision in his left eye.

James Mitchell, a CIA contractor who developed the enhanced interrogation program, wrote in his book that at one point, the chief of base at the Thailand black site walked into Zubaydah’s cell and “congratulated him on the fine quality of his acting.” Haspel isn’t identified by name, but Mitchell says the chief of base told Zubaydah, “Good job! I like the way you’re drooling; it adds realism. I’m almost buying it. You wouldn’t think a grown man would do that.”

A career employee of the CIA who joined the agency in 1985, Haspel was eventually promoted and became chief of staff to Jose Rodriquez, the director of operations for counterterrorism. Without approval from the White House or Justice Department, Rodriquez ordered Haspel to destroy 92 VHS recordings of the Zubaydah interrogations, which she had initially been instructed to keep. Rodriquez wrote in his 2013 memoir “Hard Measures” that CIA agents used “an industrial-strength shredder to do the deed.”

That move led to a backlash that prompted the Senate Intelligence Committee to examine of the CIA’s enhanced interrogation program, eventually publishing a 7,000-page report that concluded torture was not effective.

In the declassified chronology obtained by VICE News, the agency maintained that the harsh interrogations “enabled the CIA to disrupt terrorist plots, capture additional terrorists, and collect a high-volume of critical intelligence.” The CIA specifically mentioned several plots that were disrupted as a result, including plans to to crash a hijacked airliner into the tallest building in Los Angeles, and to detonate a nuclear “dirty bomb” in Washington, D.C.

“You feel like your arms and your legs are going to separate from your body”

The document shows how in 2006 the CIA settled on seven techniques designed to “quickly induce an exploitable state of mind” in detainees. These were deemed “critical to the effectiveness” of the program. They included “sleep deprivation of up to 180 hours in a 30-day period,” and “dietary manipulation,” which included the use of a “mathematical formula” to determine each detainee’s minimal allowable calorie intake.

The CIA wrote that the sleep deprivation “focuses the detainee’s attention on his current situation rather than ideological goals,” while withholding food “helps undermine the detainees motivation to continue withholding information.”

In a deposition with the ACLU, another former black site detainee, Mohamed Ahmed Ben Soud, described his experience being subjected to some of these techniques at a secret CIA prison in Afghanistan. He recounted being stripped naked, having cold water poured on him, and getting his head slammed into a wall. He was strapped to something he called “the terror table,” placed in a small box he dubbed “the coffin,” and locked in “the hanging room,” where he said he was chained to a metal rod with his shackled behind him and his feet barely touching the floor.

“You feel like your arms and your legs are going to separate from your body,” he said.

Another technique favored by the CIA was called “walling,” where a detainee would essentially be slammed against a wooden wall while he being questioned. The CIA said this tactic had a “significant effect” on the person being interrogated.

“It’s a big wooden wall placed on a wall where the prisoner will be pushed strongly against the wall in a continuous, rough way,” Ben Soud said. “Also I was naked. Because of that they would put a round plastic tube around my neck. And then they would hit me forcefully against the wall.”

Ben Soud was eventually released and he won a settlement against Mitchell and another contractor who helped the CIA design the enhanced interrogation program. He maintains that he never had any connection to al-Qaida or other terrorist groups.

Despite the legal issues, public outcry, and questions about the efficacy of torture, President Trump has expressed support for bringing back the enhanced interrogation. So far, his top advisors, including Secretary of Defense Jim Mattis, have talked him out of it. (“Give me a pack of cigarettes and a couple of beers, and I’ll do better,” Mattis reportedly said while explaining to Trump that winning the trust of detainees is more effective.)

CIA officials who worked with Haspel have defended her record, including Pompeo, who issued a statement calling her “an exemplary intelligence officer and a devoted patriot,” who has “an uncanny ability to get things done and to inspire those around her.” James Clapper, the former Director of National Intelligence under President Obama, said Haspel is “deeply respected by the workforce as well as those outside the agency.”

But if Haspel takes over at the CIA, there is concern that Trump will again be tempted to revive the use of torture on U.S. detainees. Oregon Sen. Ron Wyden, a Democrat on the Senate Intelligence Committee, said he opposes her nomination and called for more information about her role in the the torture program to be made public.

“Ms. Haspel's background makes her unsuitable to serve as CIA director,” Wyden said. “Her nomination must include total transparency about this background, which I called for more than a year ago when she was appointed deputy director. If Ms. Haspel seeks to serve at the highest levels of U.S. intelligence, the government can no longer cover up disturbing facts from her past.”