President Donald Trump's CIA nominee said Wednesday at her confirmation hearing that she doesn't believe torture works as an interrogation technique and that her "strong moral compass" would prevent her from carrying out any presidential order she found objectionable.

Under questioning by members of the Senate Intelligence Committee, acting CIA Director Gina Haspel said she would not permit the spy agency to restart the kind of harsh detention and interrogation program it ran at black sites after Sept. 11. It was one of the darkest chapters of the CIA's history and tainted America's image worldwide.

Senators asked how she would respond if Trump — who has said he supports harsh interrogation techniques like waterboarding and "a hell of a lot worse" — ordered her to do something she found morally objectionable.

"I would not allow CIA to undertake activity that I thought was immoral, even if it was technically legal," said Haspel, a 33-year veteran of the agency. "I would absolutely not permit it."

When asked if she agrees with the president's assertion that torture works, Haspel said: "I don't believe that torture works." She added that she doesn't think Trump would ask the CIA to resume waterboarding, which simulates drowning.

She faces what will likely be a close confirmation vote in the full Senate. The CIA director position opened up after Mike Pompeo was named secretary of state. Haspel would be the first female CIA director.

While she has deep experience, her nomination is contentious because she was chief of base of a covert detention site in Thailand where terror suspects were waterboarded. There also have been questions about how she drafted a cable that her boss used to order the destruction of videotapes of interrogation sessions conducted at the site.

Protesters disrupted the hearing shouting, "Prosecute the torturers!" and "Bloody Gina!" Haspel remained stone-faced as police escorted them out of the room.

"I realize that there are strong disagreements on the effectiveness of the CIA's detention and interrogation program," Haspel wrote in answers to more than 100 questions submitted by committee members and released at her hearing.

"In my view — a view shared by all nine former directors and acting directors — the CIA was able to collect valuable intelligence that contributed to the prevention of further terrorist attacks. That said, it is impossible to know whether the CIA could have obtained the same information in another way," she wrote.

She also said there is little question that the program harmed CIA officers who participated and that it damaged U.S. relations with allies.

Being in the public spotlight is new for Haspel. She spent more than 30 years working undercover, acquiring secret information from dead drops and at meetings in dusty back alleys of third-world capitals.

Still, the 61-year-old intelligence professional portrayed herself as a "typical middle-class American" with a "strong sense of right and wrong." She said she was born in Kentucky as the eldest of five children. While her family has deep roots there, she grew up as an Air Force brat, following her father to postings all over the world.

She staunchly defended her role in the 2005 destruction of the videotapes. She said that she never saw the videos and was not depicted on them, but that the destruction was important at the time to protect the CIA personnel showed on the tapes from being targeted by militants. She said, however, that she would not support destroying them today.

The Justice Department investigated the destruction of the tapes, but no charges were filed. Six Democratic senators wrote Attorney General Jeff Sessions on Wednesday saying that all senators should be able to see the Justice Department's investigative report on the destruction of the tapes. The Democrats wrote that they "believe that no senator can consider Ms. Haspel's nomination in good conscience without first reviewing this document."

The CIA investigated too. Last month, the CIA released a 2011 memo summarizing a disciplinary review conducted by then-CIA Deputy Director Mike Morell. He said that while Haspel was one of the two officers "directly involved in the decision to destroy the tapes," he "found no fault" with what she did.

While the CIA director technically reports to the director of national intelligence, Haspel would be the face of the nation's top spy agency and a top Trump adviser. She has received strong backing from former top intelligence officials and most Republicans. Sen. Joe Manchin, D-W.Va., also announced his support Wednesday. But Sen. Angus King, I-Maine, who announced he will vote against Haspel, and several Democrats on the committee said they thought she was not as forthcoming in her responses as they had hoped.

Haspel's opponents outside Congress include Amnesty International and Human Rights Watch.

More than 100 former U.S. ambassadors who served both Republican and Democratic presidents sent the Senate a letter opposing Haspel, saying that despite her credentials, confirming her would give authoritarian leaders around the world the license to say U.S. behavior is "no different from ours."

___

Associated Press writer Mary Clare Jalonick contributed to this report.