Long before Donald Trump ever nominated Gina Haspel to run the CIA, a memoir from a former CIA top attorney contained a line with the power to do serious damage to her chances.

Haspel’s informal nomination ran into immediate jeopardy last month over her 2002 supervision of the agency’s first secret black-site prison, located in Thailand, where two early detainees, Abu Zubaydah and Abdul Rahim al-Nashiri, were tortured. (She directly ran the black site, though after Zubaydah’s most intense period of torture that year.)

But in his 2014 book, John Rizzo, a longtime senior CIA lawyer, indicated that Haspel was responsible for the incommunicado detention and torture not of two men, but of dozens, potentially. Former intelligence officials interviewed by The Daily Beast have portrayed Haspel’s experience similarly.

Rizzo, in his memoir, Company Man, looked back on his time in a Langley controversy he likened to “a big turd dumped on my desk”: the fateful November 2005 decision, made by Haspel’s then-boss Jose Rodriguez with her support, to destroy 92 videotapes depicting the 2002 torture of Zubaydah and al-Nashiri.

Rizzo wrote that Rodriguez’s then-chief of staff—who was Haspel, though he didn’t name her, as her identity was then an official secret—was deeply involved in the agency’s torture program.

“Jose installed as his chief of staff an officer from the Counterterrorist Center who had previously run the interrogation program,” Rizzo wrote.

That’s a substantially broader declaration than the history already dogging Haspel, the agency’s deputy director, whom the White House formally nominated as its next CIA director late on Tuesday.

It would be years before Rizzo’s passage caused any controversy. The CIA did not challenge it when it was published. (The book went through the CIA’s pre-publication review, though that only inspects for classified information and isn’t a fact-check.) But asked about it on Wednesday, with Haspel’s role in interrogations still a high-stakes official secret, the agency disputed Rizzo’s characterization.

“Much of the public narrative about Deputy Director Haspel’s career is inaccurate, including this specific claim,” said CIA spokesperson Ryan Trapani.

“Gina Haspel is one of the most qualified persons nominated to be CIA Director. She’s a tested and respected leader who will lead consistent with our mission, expertise, values, and the law.”

Rizzo, who was acting CIA general counsel during much of the time the torture program occurred, insisted that the passage was correct then—and is still right today.

“All I can say is that I stand by everything I wrote in my book about the tapes episode, and no one from the Agency has asked me to correct anything I wrote,” Rizzo told The Daily Beast. He did not answer follow-up questions.

The sudden dispute underscores the precariousness of Haspel’s potential directorship. Haspel, a three-decade CIA officer, faces enormous obstacles in the Senate, where intelligence committee members are demanding substantial disclosure of her involvement in post-9/11 renditions, detentions and interrogations. Much of Haspel’s background during the torture program, as well as her specific role in it, remains classified.

“ To the best of my understanding, she ran the interrogation program... Her becoming director absolutely terrifies me. Once I heard her name, I immediately thought, ‘Oh, God.’ ” — former CIA official

“[T]he more we review the classified facts, the more disturbed we are,” three key Democratic senators on the panel, Dianne Feinstein—who led the committee’s years-long torture inquiry—Ron Wyden, and Martin Heinrich wrote to CIA Director Mike Pompeo on Monday (PDF). They said they were disturbed “both by the actions she has taken during her career and by the CIA’s failure to allow the public the opportunity to consider them.” Wyden followed up in a USA Today interview Tuesday charging the CIA with a “cover-up” of Haspel’s torture record, adding that his concerns about her are “are significantly broader than what has been alleged in the press.”

Declassified documents and Daily Beast sources indicate that Haspel joined the agency’s Counterterrorism Center shortly after the 9/11 attacks. Rodriguez, then the self-proclaimed “chief operations officer” who began running the center in May 2002, writes in his book of taking over a “superstar” woman to whom he assigned the cover name “Jane.”

Rodriguez “had her head one of our earliest ‘black sites,’” he writes in his 2011 memoir, Hard Measures. In a biographical detail that corresponds to the public record about Haspel’s career, “later she became my right arm as chief of staff when I led the clandestine service.”

That was in November 2004, when Rodriguez became the CIA’s deputy director for operations, a job that got a name change to head of the National Clandestine Service. While it’s not exactly clear when Haspel left the Counterterrorism Center to rejoin her mentor, Haspel remained at the Center in 2003 and 2004, the period during which CTC was most intensely involved in torture.

Rodriguez did not respond to messages seeking comment about Haspel. His co-author, Bill Harlow, a former senior aide to CIA Director George Tenet, said he had “no reason to disbelieve anything [Rodriguez] wrote.” But Harlow added he wasn’t in a position to discuss Haspel’s agency tenure.

“I’m not specifically aware of the exact timing of her various assignments and couldn’t talk about it if I were. As far as I know the agency hasn’t declassified it,” Harlow told The Daily Beast.

But the specifics of Haspel’s involvement in interrogations is now a frontburner issue for the Senate intelligence committee, and a test for both the committee and the agency about the legacy of torture now that Donald Trump, who has expressed enthusiasm for torture, is president.

This isn’t the first time that legacy has been a problem for Haspel. In 2013, she was unable to take her old boss Rodriguez’s position in 2013. At the time, a knowledgeable former CIA official recalled, there was confusion and surprise that someone with Haspel’s background in torture could have been a credible candidate for such a senior position.

“To the best of my understanding, she ran the interrogation program,” the official said.

“Her becoming director absolutely terrifies me,” continued the former CIA official. “Once I heard her name, I immediately thought, ‘Oh, God.’”

Back then, in a story first reported by The New York Times, Feinstein—then the Senate committee chair—made it clear to then-director John Brennan that she objected to Haspel leading the CIA’s clandestine service. Brennan chose another chief.

But by 2017, those obstacles to Haspel had shrunk, apparently. Trump tapped Haspel to be deputy director of the CIA. And despite an attempted deposition of her by two contractor psychologists who designed the torture program, the opposition to that elevation was relatively muted.

“ [T]he more we review the classified facts, the more disturbed we are... both by the actions she has taken during her career and by the CIA’s failure to allow the public the opportunity to consider them. ” — Three Democratic senators

Over the past month, the CIA and its senior alumni have attempted to redefine Haspel after her impending nomination saw a wave of critical coverage over her role in torture. The agency permitted the release of saccharine biographical details to reporters, like her affinities for Johnny Cash and University of Kentucky basketball, while shedding no light on her history with renditions, detentions, or so-called enhanced interrogations. The agency portrayed her as a gender pioneer whose thwarted ambition to attend West Point, at the time closed to women cadets, would be avenged by her ascension as the agency’s first women director. Its public-affairs department blasted this out to reporters with the subject line, “CIA Introduces Gina Haspel to the American People.”

Haspel, if confirmed, would be the first director to rise from the CIA’s operational ranks with uninterrupted service since William Colby in 1973 , which helps explain her depth of support from within the agency. But she’s also the first potential director from the CIA generation involved in post-9/11 torture, making her nomination inescapably a referendum on a dark period of history that the agency wants definitively resolved and human rights advocates say demands vastly more accountability than it’s received. (That’s another uncomfortable parallel with Colby’s tenure.)

“If Ms. Haspel is confirmed, it will send a terrible message to the world broadly, and to the officers of the CIA more superficially,” a former U.S. intelligence official said. “The CIA, and its former officers, are pushing so hard for Ms. Haspel to be director because if she’s confirmed, it essentially exonerates her, the CIA and all of these former senior CIA officials from their involvement in or their defense of the torture program.”

UPDATE 5/9/18: In an email to The Daily Beast after the publication of this story, Rizzo wrote, “Upon further reflection, I want to make clear that I never intended to suggest in my book that Gina Haspell [sic] was in charge of CIA’s interrogation program. She was not. I have nothing further to say on this subject other than to stress that I fully support her nomination to be CIA Director.”

Rizzo would not say why his mind had suddenly changed, or whether there were other parts of his book that he was now abandoning.

During her Senate confirmation hearing, Haspel said, “I did not run the interrogation department. In fact, I was not even read into the interrogation program until it had been up and running for a year.”

But that statement defies plain logic. Haspel was in charge of a secret prison while torture took place—not even the CIA disputes that. How could she not have known about a program that she helped execute?