WASHINGTON — Gina Haspel, President Donald Trump's nominee to be CIA director, broached the idea of withdrawing her nomination on Friday over concerns that reopening the debate over brutal interrogations could damage the spy agency, two U.S. officials told NBC News.

Haspel, who faces a confirmation hearing Wednesday, decided to go ahead after a weekend phone call with Trump and after White House officials went to CIA headquarters in Langley, Virginia, to reassure her that she had their support, the officials said.

Raj Shah, the White House's principal deputy press secretary, told NBC News: "Acting Director Haspel is a highly qualified nominee who has dedicated over three decades of service to her country. Her nomination will not be derailed by partisan critics who side with the ACLU over the CIA on how to keep the American people safe."

Currently the acting CIA director, Haspel would become the first woman to permanently hold the post if confirmed. She was involved in prep sessions on Sunday, officials said.

The news of the uncertainty around her nomination was first reported Sunday by The Washington Post.

One sign that things were amiss came Friday morning, when Haspel was due to have conducted a walk-through at the hearing room in the Hart Senate Office Building. That visit was canceled at the last minute. Later Friday, White House aides went to CIA headquarters after learning that she was concerned that going forward with her nomination could damage the agency.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"Those who know the true Gina Haspel — who worked with her, who served with her, who helped her confront terrorism, Russia and countless other threats to our nation — they almost uniformly support her," Ryan Trapani, a CIA spokesman, said in a statement.

"That is true for people who disagree about nearly everything else. There is a reason for that," Trapani said. "When the American people finally have a chance to see the true Gina Haspel on Wednesday, they will understand why she is so admired and why she is and will be a great leader for this agency."

White House Press Secretary Sarah Huckabee Sanders, who met with Haspel along with Marc Short, the White House's director of legislative affairs, tweeted her support on Saturday.

There is no one more qualified to be the first woman to lead the CIA than 30+ year CIA veteran Gina Haspel. Any Democrat who claims to support women’s empowerment and our national security but opposes her nomination is a total hypocrite — Sarah Sanders (@PressSec) May 5, 2018

"She's going full steam ahead. She's going to be at the hearing Wednesday mornings," said NBC News national security analyst Jeremy Bash, a former chief of staff at the CIA and the Defense Department, who said he spoke to Haspel earlier Sunday.

"I think in her mode of really putting the agency before herself, she said, 'If that's going to harm CIA, I don't need to be a part of this,'" Bash said in an interview on MSNBC's "Kasie DC."

"But I think everyone around her said, 'No, you are the right person to do this,'" he said. "The White House bucked her up, and she's going full steam ahead."

Haspel, who has been deputy CIA director for 15 months, is a career CIA operations officer with 33 years at the agency. Her nomination had drawn wide support from CIA veterans, including former Obama administration officials who are bitterly critical of Trump. But she is expected to face tough questions Wednesday over her role in an interrogation program that many say amounted to torture after the terrorist attacks of Sept. 11, 2001.

Several U.S. officials told NBC News that Haspel was the base chief at a secret CIA prison in Thailand where an al Qaeda detainee was waterboarded three times and confined to a small box. The detainee, Abd al-Rahim al-Nashiri, a Saudi citizen, is alleged to have been the mastermind of the bombing of the USS Cole and other terrorist attacks.

She later drafted a cable with an order from her boss instructing CIA officers to shred all videotapes of CIA interrogations sessions. She wasn't reprimanded for her role in the destruction of the tapes, but some CIA officials, and many lawmakers, viewed the episode as an improper attempt at a cover-up.

One of the problems is that Haspel's role remains classified, and she won't be able to answer questions about what she did in Thailand in the open confirmation hearing. Nor will she be able to say much else about her actions while serving in the CIA's Counterterrorism Center — or anywhere else. She served overseas in Africa and Europe, including several stints as a chief of station, including in London. Fluent in Turkish and Russian, she ran spying operations against the Russians, U.S. officials said.

My highly respected nominee for CIA Director, Gina Haspel, has come under fire because she was too tough on Terrorists. Think of that, in these very dangerous times, we have the most qualified person, a woman, who Democrats want OUT because she is too tough on terror. Win Gina! — Donald J. Trump (@realDonaldTrump) May 7, 2018

During the 2016 presidential campaign, Trump repeatedly said he would bring back waterboarding and other forms of harsh interrogation in the questioning of terrorism detainees. He later said he had reconsidered, based on advice from Defense Secretary James Mattis that such methods are unnecessary.

On Monday morning, Trump tweeted about Haspel, saying she's come under fire from Democrats because "she is too tough on terror."

Haspel is expected to tell senators that she would resist any effort by political leaders to order the CIA to ever again engage in brutal interrogations, which are now prohibited by law.

A senior Democratic Senate aide said Sunday that if Haspel does that and performs well at the hearing, her chances of being confirmed are high.