This March 21, 2017, photo provided by the CIA, shows CIA Deputy Director Gina Haspel. Senate Democrats are demanding the CIA release more information about the ex-undercover operative President Donald Trump nominated to direct the spy agency. Democrats say Haspel no longer works undercover and the public has a right to know more about her involvement in the harsh interrogation of terror suspects after 9/11. The CIA has pledged to release more information, but it
PHOTO: CIA
This March 21, 2017, photo provided by the CIA, shows CIA Deputy Director Gina Haspel. Senate Democrats are demanding the CIA release more information about the ex-undercover operative President Donald Trump nominated to direct the spy agency. Democrats say Haspel no longer works undercover and the public has a right to know more about her involvement in the harsh interrogation of terror suspects after 9/11. The CIA has pledged to release more information, but it's not clear if it will share details Democrats seek to illuminate Haspel's clandestine work.(CIA via AP)
Now playing
00:52
Meet the first female CIA director
Gina Haspel testifies before the Senate Intelligence Committee on her nomination to be the next CIA director in the Hart Senate Office Building on Capitol Hill in Washington, DC on May 9, 2018. (Photo by MANDEL NGAN / AFP)        (Photo credit should read MANDEL NGAN/AFP/Getty Images)
PHOTO: MANDEL NGAN/AFP/Getty Images
Gina Haspel testifies before the Senate Intelligence Committee on her nomination to be the next CIA director in the Hart Senate Office Building on Capitol Hill in Washington, DC on May 9, 2018. (Photo by MANDEL NGAN / AFP) (Photo credit should read MANDEL NGAN/AFP/Getty Images)
Now playing
01:17
Senator to Haspel: Where was your moral compass?
phil mudd 05092018
PHOTO: CNN
phil mudd 05092018
Now playing
01:22
Mudd slams senators over Haspel interrogation
CIA nominee Gina Haspel is sworn in during a confirmation hearing of the Senate Intelligence Committee on Capitol Hill, Wednesday, May 9, 2018 in Washington. (AP/Alex Brandon)
PHOTO: Alex Brandon/AP
CIA nominee Gina Haspel is sworn in during a confirmation hearing of the Senate Intelligence Committee on Capitol Hill, Wednesday, May 9, 2018 in Washington. (AP/Alex Brandon)
Now playing
02:33
Haspel balks on morality of torture program
SEN. Intel Cmte Hrng: Haspel Nomination to be CIA Director  Witness Camera
PHOTO: pool
SEN. Intel Cmte Hrng: Haspel Nomination to be CIA Director Witness Camera
Now playing
01:03
Haspel: I will not restart torture programs
SEN. Intel Cmte Hrng: Haspel Nomination to be CIA Director  Witness Camera
PHOTO: pool
SEN. Intel Cmte Hrng: Haspel Nomination to be CIA Director Witness Camera
Now playing
00:55
Protesters disrupt Haspel's nomination hearing
PHOTO: Pool
Now playing
01:41
White House: Haspel committed to confirmation
On March 13th, President Donald Trump announced that Gina Haspel was his pick to become the new Director of the CIA.
PHOTO: CIA
On March 13th, President Donald Trump announced that Gina Haspel was his pick to become the new Director of the CIA.
Now playing
01:38
WaPo: Haspel sought to withdraw CIA nomination
Gina Haspel, center, speaks to Jared Kushner before a meeting between Secretary of Defense Jim Mattis and Saudi Arabia
PHOTO: pool
Gina Haspel, center, speaks to Jared Kushner before a meeting between Secretary of Defense Jim Mattis and Saudi Arabia's Deputy Crown Prince and Minister of Defense Mohammed bin Salman at the Pentagon in March 2017.
Now playing
02:24
Destroyed tapes haunt Trump CIA pick
PHOTO: CNN
Now playing
01:51
Obama's CIA chief defends Trump's pick
PHOTO: CIA
Now playing
02:03
Clapper: Haspel highly respected, good for CIA
PHOTO: SAUL LOEB/AFP/Getty Images
Now playing
01:04
Gina Haspel nominated to be CIA director
On March 13th, President Donald Trump announced that Gina Haspel was his pick to become the new Director of the CIA.
PHOTO: CIA
On March 13th, President Donald Trump announced that Gina Haspel was his pick to become the new Director of the CIA.
Now playing
01:42
CIA facing questions over Gina Haspel tweets
(CNN) —  

Gina Haspel was confirmed Thursday to be the first female director of the CIA with the help of votes from a half-dozen Senate Democrats.

Haspel was confirmed in a 54-45 vote, the culmination of a roller-coaster nomination that appeared to be in danger at several points after she was abruptly selected by President Donald Trump in March.

Three Republicans opposed Haspel’s nomination: Sens. Rand Paul of Kentucky, Jeff Flake of Arizona and John McCain of Arizona, although McCain did not vote because he’s battling brain cancer at home.

But Haspel secured enough votes to win confirmation with the backing of six Democrats, including Virginia Sen. Mark Warner, the top Democrat on the Senate Intelligence Committee.

Most of the Democratic votes in favor of Haspel came from senators who are up for re-election in November in states that Trump won in 2016, including Sens. Joe Manchin of West Virginia, Joe Donnelly of Indiana, Heidi Heitkamp of North Dakota and Bill Nelson of Florida.

Sen. Jeanne Shaheen of New Hampshire also voted in favor of Haspel’s confirmation.

Democrats who backed Haspel pointed to her 33-year CIA career, 32 years of which was spent undercover, as well as her broad support from former intelligence officials, including many senior Obama administration officials.

“Gina Haspel is among one of the most qualified people to be nominated to be director of the CIA,” Warner said. “I feel safer knowing the CIA has Miss Haspel at the helm. … I believe Gina Haspel should be confirmed. I look forward to supporting her.”

But Haspel faced a barrage of criticism from some Democrats and human rights groups after she was picked in March to succeed Mike Pompeo as the nation’s top spy, over her role in the George W. Bush administration’s detention and interrogation program.

The criticism came on two fronts: Haspel ran a CIA black site in Thailand in 2002 where detainees were brutally interrogated with tactics that critics say is torture. And she drafted the cable that her boss sent to destroy dozens of CIA interrogation tapes in 2005.

RELATED: CIA releases memo clearing Haspel over destruction of waterboarding tapes

“What I can say is her classified comments about her background have been as troubling as her public testimony,” Democratic Sen. Ron Wyden of Oregon, a member of the Senate Intelligence Committee, said on the Senate floor Thursday.

The attacks on Haspel’s record made Trump administration officials nervous about her nomination, especially after Paul announced his opposition, which meant Democrats had the ability to block Haspel’s confirmation.

Alternatives to Haspel were tossed around within the administration, and Haspel herself offered to withdraw ahead of her confirmation hearing.

But the White House pushed forward on Haspel, and in her confirmation hearing last week she did enough to secure votes from Democrats who were on the fence, even as she repeatedly danced around questions about whether she thought the Bush-era interrogation program was immoral.

Senate Intelligence Chairman Richard Burr, a North Carolina Republican, said that Haspel has “consistently proven herself as a strong leader” on the Senate floor Thursday.

Haspel took one more step this week to get wavering Democrats on her side, sending Warner a letter on Tuesday in which she acknowledged that the interrogation program did damage to the CIA and should not have been conducted, which she didn’t say in her public hearing.

Haspel’s critics argued she still wouldn’t say if she thought the interrogation program was immoral. And they expressed frustration that the CIA – and Haspel herself – refused to make public a full accounting of her CIA career and her role in the interrogation program.

They argued that the CIA selectively released details publicly about Haspel’s career – like the 2011 internal CIA report that cleared her of wrongdoing in the tapes’ destruction – in order to bolster her nomination.

The CIA did make classified materials about Haspel’s record available to senators. But several of her opponents pointed to the fact that the Justice Department’s report from the special counsel who investigated the destruction of the tapes was available only to senators on the Senate Intelligence Committee, and not the full body.

“My questions about Ms. Haspel’s role in the destruction of videotapes relevant to discussions occurring in Congress regarding the program have not been adequately answered,” Flake said in a statement announcing his opposition.

Burr, who argued that the report shouldn’t have been made available to the Senate at all, said the CIA declassified everything that it was able to.

“She has earned the respect of the agency workforce, of her peers, of Republicans, of Democrats, of military officers, of civilian security leaders, evidenced by the number of letters received in support of her nomination too numerous to read,” Burr said on the Senate floor.