Gina Haspel sought to draw a moral line during a hearing before the Senate Intelligence Committee on Wednesday, promising that she “will not restart” the CIA’s controversial interrogation program and would disregard any orders from President Trump to carry out other questionable activities if confirmed to lead the agency.

But Haspel resisted senators’ efforts to make her say whether she believed it had been morally wrong at the time for the agency to use “enhanced” interrogation techniques on terrorist suspects, including waterboarding, which many have said is a form of torture. She emphasized repeatedly that the techniques had been authorized by the U.S. government’s highest legal authorities and by President George W. Bush.

“We got valuable information from debriefing al-Qaeda detainees,” she told Sen. Kamala D. Harris (D-Calif.) during one of the hearing’s most tense moments. “I don’t think it’s knowable whether interrogation techniques played a role in that.”

A lengthy report by the Senate Intelligence Committee, released publicly in 2014, concluded that the CIA’s interrogation techniques were not a viable means of gaining intelligence and that the agency’s justification for using them “rested on inaccurate claims of their effectiveness.”

Senators have asked several of Trump’s Cabinet nominees to commit to stand up to the president and inform Congress if he were to pressure them to do anything legally or morally questionable. But the pledge takes on extra significance with Haspel, whose hearing centered on the role she played in the CIA’s interrogation program — something Trump said on the campaign trail he wouldn’t mind bringing back into practice.

“We’re not getting back into that business,” Haspel said, citing her “strong” moral compass. “I would not restart, under any circumstances, an interrogation program at CIA. . . . I would not allow CIA to undertake activity that is immoral, even if it is technically legal.”

Haspel’s first public showing in her 33-year career at the CIA, most of which was spent in the clandestine service, appeared to strengthen her chances the committee will approve her nomination when it meets to vote, probably next week, and improve the outlook for her confirmation. If confirmed, Haspel would become the first woman to lead the agency in its history — a fact that GOP members of the intelligence panel mentioned frequently.

During her testimony, Haspel cited the support she has among the agency’s rank and file, noting that “they know that I don’t need time to learn the business of what CIA does.”

“I know CIA like the back of my hand,” she said. “I know them, I know the threats we face, and I know what we need to be successful in our mission.”

But Haspel’s critics warned that her confirmation would also set “a precedent for secret confirmation processes,” in the words of Sen. Ron Wyden (D-Ore.), as she has resisted calls to declassify additional records about her career.

“I think you will find me to be a typical middle-class American,” Haspel told senators.

Haspel’s CIA career has been anything but ordinary — and though she acknowledged that little is known about her publicly,she offered few details about her career.

Haspel took charge in 2002 of a secret CIA detention facility in Thailand where an al-Qaeda suspect was waterboarded, and in 2005 she drafted a cable, ultimately issued by her boss, ordering the destruction of dozens of videotapes of the interrogation sessions. She told senators Wednesday that she had “absolutely” supported the destruction of 92 tapes, all depicting one detainee being interrogated, over concerns “about the security risk that was posed to our officers.” She noted that CIA lawyers at the time had determined there was no legal obligation to retain them.

But when asked by Sen. Martin Heinrich (D-N.M.) whether she would support the same order today, she said she would not, noting that she had learned from experience that additional stakeholders — such as the lawmakers and government officials raising questions about the interrogations only days before — should have been involved in the decision to destroy the tapes.

Haspel told the committee that she fully supports current “standards for detainee treatment required by law” and that, in retrospect, the CIA “was not prepared to conduct a detention and interrogation program.” Haspel said that the agency learned “tough lessons” during “that tumultuous time” and that theexperiencereinforced her “personal commitment, clearly and without reservation,” not to restart the CIA’s detention and interrogation program.

She was warned that a pledge to simply follow the law would be insufficient. “That’s the least we should expect from any nominee and certainly the director of the CIA,” the committee’s vice chairman, Sen. Mark R. Warner (D-Va.), told Haspel.

Chief among senators’ concerns was how Haspel, who argued that she was only following orders when instructed to draft the cable ordering the destruction of interrogation evidence, would respond to an order from Trump. She said she had a “great reputation” with the president and his inner circle, adding that “the president does turn to me for my view on certain countries and certain experiences.”

“I give him my best advice,” Haspel said, noting that she separates her views from that of CIA analysts.

But she told senators that she doubted the president would ever ask her to waterboard a suspectand demurred when Sen. Jack Reed (D-R.I.) asked whether she would report to Congress if Trump were to ask her for a loyalty pledge akin to the one he allegedly sought from former FBI director James B. Comey.

Haspel’s hearing comes just days after she offered to bow out to avoid discussing her role in the agency’s interrogation program. White House officials persuaded her not to step aside, and she arrived on Capitol Hill primed to defend her record. Haspel pushed back against the characterization that she held a decision-making role in the interrogation program, saying the CIA’s former acting general counsel John Rizzo had corrected an assertion in his memoir that Haspel “had previously run the interrogation program.”

Haspel said, too, that she conducted herself “honorably and in accordance with U.S. law” and that she understands “the difference between right and wrong” when senators challenged her over why she went along with a program most now liken to torture, and the agency’s efforts to cover it up.

“That was 17 years ago,” Haspel told Heinrich of the cable she drafted, arguing that “when you’re out in the trenches and Washington says, ‘This is what we need you to do, this is legal, the attorney general has deemed it so,’ ” she complied — even though today she would not support the same order.

Haspel’s interview with the committee went smoothly enough to earn her a few key endorsements: Sen. Joe Manchin III (W.Va.), a panel member, became the first Democrat to back Haspel, while Sens. Susan Collins (R-Maine) and Ted Cruz (R-Tex.), whose support was uncertain, said they also intend to vote for her. She needs some Democratic support to be confirmed by the Senate, where Republicans hold a 51-to-49 majority, as Sen. Rand Paul (R-Ky.) and Sen. John McCain (R-Ariz.) are both opposed to her nomination.

Although McCain is unlikely to cast a floor vote on Haspel, as he is out of Washington receiving treatment for a rare and serious form of brain cancer, his opinion carries particular symbolic weight, as a war hero who was tortured in Vietnam.

“Ms. Haspel’s role in overseeing the use of torture by Americans is disturbing,” McCain said in a statement late Wednesday. “Her refusal to acknowledge torture’s immorality is disqualifying. I believe the Senate should exercise its duty of advice and consent and reject this nomination.”

But even with her confirmation appearing likely, Democratic senators are continuing to push for more transparency, arguing that while a career CIA operative must stay in the shadows, a Cabinet-level nominee must be accountable to the American public.

Warner and other panel Democrats have pushed Haspel to use her authority as acting director of the CIA to declassify additional documents related to her career at the agency so the public, not just lawmakers, can scrutinize her tenure. During the hearing, Harris also challenged Haspel to recuse herself from decisions about her records.

Haspel refused to offer any such promises.

The only Haspel document the CIA has declassified isan internal review that found she was not at fault in the destruction of the interrogation tapes.