President Trump’s nominee for CIA director Gina Haspel on Wednesday defended her “moral compass” as she brushed back Democratic criticism of her handling of the post-9/11 detention and interrogation program -- while sharing gripping details about her credentials as a lifelong spy.

Haspel spoke at her confirmation hearing to replace now-Secretary of State Mike Pompeo at the agency's helm, and sought to head off criticism about her role in the interrogation of terror suspects. While GOP lawmakers and bipartisan voices from the intelligence community have strongly backed her bid, Democrats have threatened to stall her nomination over the Bush-era programs.

But under repeated questioning from Democrats on the Senate Intelligence Committee who were critical of that phase in her career, Haspel did not hesitate to remind them of the important role played by the intelligence community after the 9/11 attacks.

“After 9/11 … I stepped up. I was not on the sidelines, I was on the frontlines in the Cold War and I was on the frontlines in the fight against Al Qaeda,” she said in response to grilling from Sen. Ron Wyden, D-Ore.

Sen. Kamala Harris, D-Calif., a possible 2020 presidential candidate, also repeatedly pressed her to give a yes or no answer as to whether the prior interrogation program was immoral, and scolded her when she wouldn't: "You also, in this hearing, have a responsibility to answer the questions being asked of you."

But Haspel pledged early on the hearing that under her leadership, post-9/11-era interrogation would not be resumed.

“I have views on this issue, and I want to be clear. Having served in that tumultuous time, I can offer you my personal commitment, clearly and without reservation, that under my leadership on my watch CIA will not restart such a detention and interrogation program,” she said.

Haspel, currently the deputy CIA director, was chief of a base at a black-site prison in Thailand in 2002, where controversial interrogation techniques were used on detainees -- including waterboarding.

Senate Democrats have questioned her fitness to run the agency due to their objections to interrogation techniques. They have also complained that the CIA has failed to declassify enough information about her career, leaving the public in the dark about what sort of CIA director she may be. Sen. Rand Paul, R-Ky., has also said he will not vote for her confirmation.

At the hearing, Haspel said she was confident she would not allow the CIA to engage in illegal or immoral activity, even if it came from a presidential order.

“My moral compass is strong, I would not allow CIA to undertake activity that I thought was immoral even if it was technically legal -- I would absolutely not permit it.”

But some Democrats challenged her answers, particularly what Sen. Martin Heinrich, D-N.M., described as “legalistic” responses -- but Haspel refused to criticize actions by colleagues.

“I’m not going to sit here with the benefit of hindsight and judge the very good people who made hard decisions who were running the agency in very extraordinary circumstances at the time,” she said.

It did little to stop the criticism, however. “Where was that moral compass at the time?” Heinrich asked.

Haspel was also grilled about her role in the 2005 destruction of over 92 interrogation tapes. She testified that they were destroyed on the order of her supervisor at the time Jose Rodriguez and that she was not on the tapes, though she told senators she was an advocate for destroying the tapes to protect the identity of CIA agents.

In her opening remarks, the Kentucky-born Haspel described herself as a "typical middle-class American -- one with a strong sense of right and wrong and one who loves this country."

"I know CIA like the back of my hand. I know them, I know the threats we face, and I know what we need to be successful in our mission," she said. If confirmed, Haspel would be the first woman to lead the agency and said she had seen an "outpouring of support from young women at CIA who consider it a good sign for their own prospects."

She also offered dramatic and rare insight into her career as a spy, including her recollections of 9/11 as well as shadowy meetings with foreign contacts.

"I recall my first foreign agent meeting was on a dark, moonless night with an agent I’d never met before," she said. "When I picked him up, he passed me the intelligence and I passed him extra money for the men he led. It was the beginning of an adventure I had only dreamed of."

She also said she excelled in "finding and acquiring secret information that I obtained in brush passes, dead drops, or in meetings in dusty back allies of third world capitals."

Despite Democratic objections, Haspel has won strong support from the intelligence community and bipartisan former officials including from the Obama administration.

At the beginning of the hearing, Chairman Richard Burr, R-N.C., called her “a natural fit” for the role, and warned her opponents on the panel of turning the hearing into a "trial about a long-shuttered program."

“Those who have issued with programs or operations conducted years ago should address those concerns and questions to former presidents, former directors and former attorneys general,” he said.

During the hearing, a number of protesters interrupted Haspel's testimony and were removed from the committee room, yelling “no more torture” and “say no to Gina.” A number of “Code Pink” protesters remained in attendance throughout.

The tough questioning, meanwhile, has spurred accusations that Haspel is being held to a different standard than past nominees. In his 2013 hearing, former CIA director John Brennan, who supports Haspel, was asked about the same interrogation program and said he “did not take steps to stop the CIA's use of those techniques.”

Some outlets have accused Haspel of taking part in the waterboarding of Abu Zubaydah, an alleged Al Qaeda terrorist. News site ProPublica, originator of the allegations, has since retracted the article, saying Haspel arrived to the base after the interrogation of Zubaydah ended.

But Leon Panetta, former CIA director and secretary of defense, said in a quote issued by the White House: “I’m glad it’s Gina because frankly she is someone who really knows the CIA inside out.”

She has also found significant support from Republicans, some of whom have made full-throated endorsements of her nomination.

“Haspel’s opponents have tried to use a small sliver of her career against her by arguing, essentially, that she was just too tough on Al Qaeda for this country to bear,” Sen. Tom Cotton, R-Ark., said in an op-ed for FoxNews.com. “But I’d argue that her willingness to serve in what was a highly stressful post only enhances the case for her confirmation.”

Fox News is told that the full committee likely won’t vote on her confirmation until next week. Haspel was reportedly preparing for the tough hearing by practicing her answers at mock confirmation hearings with former intelligence officials.

With the absence of Sen. John McCain, R-Ariz., and the lack of support from Paul, it means that there is a maximum of 49 GOP votes for Haspel -- meaning that for her to be confirmed, some moderate Democrats would need to back her.

A senior Senate Democratic source indicated that Haspel would win support of several Democrats, and that it was unclear if the Democratic leadership would whip against Haspel.

Haspel's is the latest in a series of tough Trump-era confirmation fights. Pompeo was confirmed only after a contentious vote, while nominee for VA secretary, Dr. Ronnie Jackson, withdrew from consideration after allegations over his conduct as White House doctor.

​​​Fox News’ Jason Donner, Chad Pergram, Lukas Mikelionis and The Associated Press contributed to this report.